Methods Summary |
---|
public java.nio.channels.SocketChannel | accept()
SocketChannel sc = ssc.accept();
if ( logger.isLoggable(Level.FINE) ) {
Socket s = sc.socket();
logger.fine("In ASServerSocketChannel.accept got connection, s.port=" +
s.getPort()+" s.localPort="+s.getLocalPort());
}
ASSocketFacadeUtils.getASSocketService().waitOnAccept(sc);
return sc;
|
public java.nio.channels.SelectableChannel | getActualChannel()
return ssc;
|
int | getPortNumber()
return this.port;
|
public void | implCloseSelectableChannel()This is the place where a serversocket in socket service finally
gets closed.
Some services [eg. MQ] closes and recreates the serversocket
while starting itself. However this can break, socket service
logic, since the waiting connections can get a "connection reset"
exception.
ASSocketFacadeUtils.getASSocketService().close(port, null, ssc);
|
public void | implConfigureBlocking(boolean b)
ssc.configureBlocking(b);
|
void | setPortNumber(int port)
this.port = port;
|
void | setServerSocketChannel(java.nio.channels.ServerSocketChannel ssc)
this.ssc = ssc;
|
public java.net.ServerSocket | socket()
try {
if (ssocket == null) {
ServerSocket ss = ssc.socket();
ssocket = new ASServerSocket(ss, this);
}
} catch (Exception e ) {
throw new RuntimeException(e);
}
return ssocket;
|
public java.lang.String | toString()
return "ASServerSocketChannel[" + ssc.toString() + "]";
|