|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opcfoundation.ua.utils.AbstractState<ServerSocketState,IOException>
org.opcfoundation.ua.utils.asyncsocket.AsyncServerSocket
public class AsyncServerSocket
ASyncoronous Server Socket
| Nested Class Summary | |
|---|---|
static interface |
AsyncServerSocket.ConnectListener
|
| Constructor Summary | |
|---|---|
AsyncServerSocket(ServerSocketChannel chan,
Executor e)
Constructor for AsyncServerSocket. |
|
AsyncServerSocket(ServerSocketChannel chan,
Executor e,
AsyncSelector sel)
Constructor for AsyncServerSocket. |
|
| Method Summary | |
|---|---|
void |
addListener(AsyncServerSocket.ConnectListener listener)
addListener. |
AsyncServerSocket |
bind(SocketAddress addr,
int backlog)
Binds the ServerSocket to a specific address
(IP address and port number). |
ServerSocketChannel |
channel()
channel. |
AsyncServerSocket |
close()
close. |
void |
removeListener(AsyncServerSocket.ConnectListener listener)
removeListener. |
ServerSocket |
socket()
socket. |
String |
toString()
|
| Methods inherited from class org.opcfoundation.ua.utils.AbstractState |
|---|
addStateListener, addStateNotifiable, assertNoError, attemptSetState, clearError, getError, getState, hasError, isStateTransitionAllowed, onListenerException, onStateTransition, removeStateListener, removeStateNotifiable, setError, setState, setState, waitForState, waitForState, waitForStateUninterruptibly |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AsyncServerSocket(ServerSocketChannel chan,
Executor e,
AsyncSelector sel)
throws ClosedChannelException
Constructor for AsyncServerSocket.
chan - a ServerSocketChannel object.e - a Executor object.sel - a AsyncSelector object.
ClosedChannelException - if any.
public AsyncServerSocket(ServerSocketChannel chan,
Executor e)
throws IOException
Constructor for AsyncServerSocket.
chan - a ServerSocketChannel object.e - a Executor object.
IOException - if any.| Method Detail |
|---|
public AsyncServerSocket bind(SocketAddress addr,
int backlog)
throws IOException
ServerSocket to a specific address
(IP address and port number).
If the address is null, then the system will pick up
an ephemeral port and a valid local address to bind the socket.
The backlog argument must be a positive
value greater than 0. If the value passed if equal or less
than 0, then the default value will be assumed.
addr - addressbacklog - backlog
IllegalArgumentException - if endpoint is a
SocketAddress subclass not supported by this socket
IOException - if errorpublic AsyncServerSocket close()
close.
AsyncServerSocket object.public ServerSocketChannel channel()
channel.
ServerSocketChannel object.public ServerSocket socket()
socket.
ServerSocket object.public void addListener(AsyncServerSocket.ConnectListener listener)
addListener.
listener - a AsyncServerSocket.ConnectListener object.public void removeListener(AsyncServerSocket.ConnectListener listener)
removeListener.
listener - a AsyncServerSocket.ConnectListener object.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||