NetworkChannel instead.@Deprecated public class MultiplexedChannel extends Object implements Channel
| Modifier and Type | Field and Description |
|---|---|
protected DatagramChannel |
dataChannel
Deprecated.
|
protected PacketHandlerPipeline |
handlers
Deprecated.
|
protected SelectionKey |
selectionKey
Deprecated.
|
| Constructor and Description |
|---|
MultiplexedChannel()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
bind(SocketAddress address)
Deprecated.
Binds the channel to an address.
|
void |
close()
Deprecated.
Disconnects and closes the channel.
Invoking this method will have no effect if the channel is already closed. |
void |
connect(SocketAddress address)
Deprecated.
Connects the channel to a remote peer.
The channel will only be able to accept traffic from that peer. |
void |
disconnect()
Deprecated.
Disconnect the channel
|
protected void |
flush()
Deprecated.
|
SocketAddress |
getLocalAddress()
Deprecated.
|
String |
getLocalHost()
Deprecated.
Gets the address the channel is bound to.
|
int |
getLocalPort()
Deprecated.
Gets the port that the channel listens to.
|
String |
getRemoteHost()
Deprecated.
|
int |
getRemotePort()
Deprecated.
|
boolean |
hasPendingData()
Deprecated.
Gets whether the channel has pending data to be written
|
boolean |
isConnected()
Deprecated.
Gets whether channel is connected or not.
|
boolean |
isOpen()
Deprecated.
Gets whether channel is open or not.
|
void |
open()
Deprecated.
Opens the channel.
|
void |
open(DatagramChannel dataChannel)
Deprecated.
Opens the channel with a pre-defined data channel.
|
protected void |
queueData(byte[] data)
Deprecated.
|
void |
receive()
Deprecated.
Receive data through the channel
|
void |
send()
Deprecated.
Send data through the channel
|
void |
setTransport(DatagramChannel channel)
Deprecated.
use
#setSelectionKey(SelectionKey) |
protected SelectionKey selectionKey
protected DatagramChannel dataChannel
protected final PacketHandlerPipeline handlers
public SocketAddress getLocalAddress()
getLocalAddress in interface Channelpublic String getLocalHost()
ChannelgetLocalHost in interface Channelpublic int getLocalPort()
ChannelgetLocalPort in interface Channelpublic String getRemoteHost()
public int getRemotePort()
@Deprecated public void setTransport(DatagramChannel channel)
#setSelectionKey(SelectionKey)channel - protected void queueData(byte[] data)
public boolean hasPendingData()
ChannelhasPendingData in interface Channelprotected void flush()
public void receive()
throws IOException
Channelreceive in interface ChannelIOExceptionpublic void send()
throws IOException
Channelsend in interface ChannelIOExceptionpublic boolean isOpen()
Channelpublic boolean isConnected()
ChannelisConnected in interface Channeltrue if the channel is connected. Otherwise, returns
false.public void bind(SocketAddress address) throws IOException
Channelbind in interface Channeladdress - the address the channel will be bounds toIOException - In case the channel is closed or could not be bound.public void connect(SocketAddress address) throws IOException
Channelconnect in interface Channeladdress - The address of the remote peer to connect toIOExceptionpublic void disconnect()
throws IOException
Channeldisconnect in interface ChannelIOExceptionpublic void open()
throws IOException
Channelopen in interface ChannelIOException - If the channel is already open or if it could not be opened.public void open(DatagramChannel dataChannel) throws IOException
Channelopen in interface ChannelIOException - In case the channel is already open or the data channel is invalid.Copyright © 2017 TeleStax, Inc.. All Rights Reserved.