NetworkChannel instead.@Deprecated public interface Channel
| 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
|
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.
|
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.
|
void |
receive()
Deprecated.
Receive data through the channel
|
void |
send()
Deprecated.
Send data through the channel
|
String getLocalHost()
int getLocalPort()
SocketAddress getLocalAddress()
void receive()
throws IOException
IOExceptionvoid send()
throws IOException
IOExceptionboolean hasPendingData()
boolean isConnected()
true if the channel is connected. Otherwise, returns
false.boolean isOpen()
true if the channel is open. Otherwise, returns
false.void bind(SocketAddress address) throws IOException
address - the address the channel will be bounds toIOException - In case the channel is closed or could not be bound.void connect(SocketAddress address) throws IOException
address - The address of the remote peer to connect toIOExceptionvoid disconnect()
throws IOException
IOExceptionvoid open()
throws IOException
IOException - If the channel is already open or if it could not be opened.void open(DatagramChannel dataChannel) throws IOException
transport - the underlying data channel where the traffic will flowIOException - In case the channel is already open or the data channel is invalid.void close()
Copyright © 2017 TeleStax, Inc.. All Rights Reserved.