|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.dream.AbstractComponent
org.objectweb.dream.channel.AbstractAcceptSocketImpl
org.objectweb.dream.channel.TCPAcceptSocketImpl
Wraps TCP ServerSocket.
Nested Class Summary |
Nested classes inherited from class org.objectweb.dream.channel.AbstractAcceptSocketImpl |
AbstractAcceptSocketImpl.AcceptTask |
Field Summary | |
protected ServerSocket |
listen
The ServerSocket used by this component |
protected int |
listeningPort
|
protected int |
openRetry
|
protected int |
soLinger
|
protected int |
soTimeout
|
protected boolean |
tcpNoDelay
|
Fields inherited from class org.objectweb.dream.channel.AbstractAcceptSocketImpl |
acceptTask, openedSocketItf |
Fields inherited from class org.objectweb.dream.AbstractComponent |
bindingLogger, componentDesc, fcState, firstStart, lifeCycleLogger, logger, weaveableC |
Fields inherited from interface org.objectweb.dream.channel.TCPAcceptSocketAttributeController |
OPEN_RETRY_DEFAULT |
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
STARTED, STOPPED |
Constructor Summary | |
TCPAcceptSocketImpl()
|
Method Summary | |
protected SocketState |
acceptSocket()
Abstract method that return a newly accepted socket. |
protected ServerSocket |
createServerSocket()
|
int |
getListeningPort()
Returns the listening port. |
int |
getOpenRetry()
Returns the number of attempts to open a ServerSocket
before aborting. |
int |
getSoLinger()
Returns the SO_LINGER parameter setted on created sockets. |
int |
getSoTimeout()
Returns the SO_TIMEOUT parameter setted on created sockets. |
boolean |
getTcpNoDelay()
Returns true if the Nagle's algorithm is disabled on created
sockets. |
void |
setListeningPort(int port)
Sets the listeningPort attribute's value. |
void |
setOpenRetry(int retry)
Sets the openRetry attribute's value. |
protected void |
setSocketOption(Socket sock)
|
void |
setSoLinger(int timeout)
Sets the soLinger attribute's value. |
void |
setSoTimeout(int timeout)
Sets the soTimeout attribute's value. |
void |
setTcpNoDelay(boolean tcpNoDelay)
Sets the tcpNoDelay attribute's value. |
void |
startFc()
|
void |
stopFc()
|
Methods inherited from class org.objectweb.dream.channel.AbstractAcceptSocketImpl |
beforeFirstStart, bindFc, listFc |
Methods inherited from class org.objectweb.dream.AbstractComponent |
getFcState, initComponent, lookupFc, setLogger, unbindFc |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ServerSocket listen
ServerSocket
used by this component
protected int listeningPort
protected int openRetry
protected boolean tcpNoDelay
protected int soTimeout
protected int soLinger
Constructor Detail |
public TCPAcceptSocketImpl()
Method Detail |
protected SocketState acceptSocket() throws IOException
AbstractAcceptSocketImpl
acceptSocket
in class AbstractAcceptSocketImpl
IOException
AbstractAcceptSocketImpl.acceptSocket()
public int getListeningPort()
TCPAcceptSocketAttributeController
getListeningPort
in interface TCPAcceptSocketAttributeController
listeningPort
attribute's value.TCPAcceptSocketAttributeController.getListeningPort()
public void setListeningPort(int port) throws IllegalLifeCycleException
TCPAcceptSocketAttributeController
listeningPort
attribute's value.
setListeningPort
in interface TCPAcceptSocketAttributeController
port
- the new listeningPort
attribute's value.
IllegalLifeCycleException
- cannot change port number if the
component is started.TCPAcceptSocketAttributeController.setListeningPort(int)
public int getOpenRetry()
TCPAcceptSocketAttributeController
ServerSocket
before aborting.
getOpenRetry
in interface TCPAcceptSocketAttributeController
openRetry
attribute's value.TCPAcceptSocketAttributeController.getOpenRetry()
public void setOpenRetry(int retry)
TCPAcceptSocketAttributeController
openRetry
attribute's value.
setOpenRetry
in interface TCPAcceptSocketAttributeController
retry
- the new openRetry
attribute's value.TCPAcceptSocketAttributeController.setOpenRetry(int)
public int getSoLinger()
TCPAcceptSocketAttributeController
SO_LINGER
parameter setted on created sockets. A
negative value disable the linger on close.
getSoLinger
in interface TCPAcceptSocketAttributeController
soLinger
attribute's value.TCPAcceptSocketAttributeController.getSoLinger()
public void setSoLinger(int timeout)
TCPAcceptSocketAttributeController
soLinger
attribute's value.
setSoLinger
in interface TCPAcceptSocketAttributeController
timeout
- the new soLinger
attribute's value.TCPAcceptSocketAttributeController.setSoLinger(int)
public int getSoTimeout()
TCPAcceptSocketAttributeController
SO_TIMEOUT
parameter setted on created sockets.
getSoTimeout
in interface TCPAcceptSocketAttributeController
soTimeout
attribute's value.TCPAcceptSocketAttributeController.getSoTimeout()
public void setSoTimeout(int timeout)
TCPAcceptSocketAttributeController
soTimeout
attribute's value.
setSoTimeout
in interface TCPAcceptSocketAttributeController
timeout
- the new soTimeout
attribute's value.TCPAcceptSocketAttributeController.setSoTimeout(int)
public boolean getTcpNoDelay()
TCPAcceptSocketAttributeController
true
if the Nagle's algorithm is disabled on created
sockets.
getTcpNoDelay
in interface TCPAcceptSocketAttributeController
tcpNoDelay
attribute's value.TCPAcceptSocketAttributeController.getTcpNoDelay()
public void setTcpNoDelay(boolean tcpNoDelay)
TCPAcceptSocketAttributeController
tcpNoDelay
attribute's value.
setTcpNoDelay
in interface TCPAcceptSocketAttributeController
tcpNoDelay
- the new tcpNoDelay
attribute's value.TCPAcceptSocketAttributeController.setTcpNoDelay(boolean)
public void startFc() throws IllegalLifeCycleException
startFc
in interface LifeCycleController
IllegalLifeCycleException
LifeCycleController.startFc()
public void stopFc() throws IllegalLifeCycleException
stopFc
in interface LifeCycleController
IllegalLifeCycleException
LifeCycleController.stopFc()
protected ServerSocket createServerSocket() throws IOException
IOException
protected void setSocketOption(Socket sock) throws SocketException
SocketException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |