public final class DatagramChannelUtil
extends java.lang.Object
Utility methods for dealing with DatagramChannel
s.
In the past, the methods provided by this class were used to provide access to functionality only available in Java 7 without breaking compatibility with Java 6. As EPICS Jackie depends on Java 8 since version 3.0.0 this class is deprecated now and is going to be removed in a future release.
Modifier and Type | Method and Description |
---|---|
static java.nio.channels.DatagramChannel |
openChannelInet4()
Deprecated.
since EPICS Jackie 3.0.0. Directly use the Java 7 SE API
instead.
|
static void |
setIpMulticastLoopOption(java.nio.channels.DatagramChannel channel,
boolean loopBack)
Deprecated.
since EPICS Jackie 3.0.0. Directly use the Java 7 SE API
instead.
|
static void |
setIpMulticastTtlOption(java.nio.channels.DatagramChannel channel,
int ttl)
Deprecated.
since EPICS Jackie 3.0.0. Directly use the Java 7 SE API
instead.
|
public static java.nio.channels.DatagramChannel openChannelInet4() throws java.io.IOException
Opens a new DatagramChannel
that is limited to IPV4. Calling this
method is equivalent to calling
DatagramChannel.open(StandardProtocolFamily.INET)
.
This method is only provided for backwards compatibility with older versions of EPICS Jackie and should not be used any longer.
DatagramChannel.open(StandardProtocolFamily.INET)
.java.io.IOException
- if the called open
method throws such an
exception.public static void setIpMulticastLoopOption(java.nio.channels.DatagramChannel channel, boolean loopBack) throws java.io.IOException
Sets the IP multicast loop option on a datagram channel. Calling this
method is equivalent to calling
channel.setOption(StandardSocketOptions.IP_MULTICAST_LOOP, loopBack)
.
This method is only provided for backwards compatibility with older versions of EPICS Jackie and should not be used any longer.
channel
- channel on which the setOption
method should be
called.loopBack
- new value for the IP_MULTICAST_LOOP
flag.java.nio.channels.ClosedChannelException
- if setOption
throws such an exception.java.lang.IllegalArgumentException
- if setOption
throws such an exception.java.io.IOException
- if setOption
throws such an exception.java.lang.UnsupportedOperationException
- if setOption
throws such an exception.public static void setIpMulticastTtlOption(java.nio.channels.DatagramChannel channel, int ttl) throws java.io.IOException
Sets the IP multicast ttl option on a datagram channel. Calling this
method is equivalent to calling
channel.setOption(StandardSocketOptions.IP_MULTICAST_TTL, ttl)
.
This method is only provided for backwards compatibility with older versions of EPICS Jackie and should not be used any longer.
channel
- channel on which the setOption
method should be
called.ttl
- new value for the IP_MULTICAST_TTL
option.java.nio.channels.ClosedChannelException
- if setOption
throws such an exception.java.lang.IllegalArgumentException
- if setOption
throws such an exception.java.io.IOException
- if setOption
throws such an exception.java.lang.UnsupportedOperationException
- if setOption
throws such an exception.Copyright © 2014–2019 aquenos GmbH. All rights reserved.