|
||||||||||
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.AbstractTCPChannelInImpl
Abstract implementation of a TCP ChannelIn Component.
Field Summary | |
protected MessageCodec |
messageCodecItf
The message encoder/decoder interface to which this component is bound. |
protected int |
openRetry
|
protected Push |
outPushItf
The server interface to which this component is bound. |
protected int |
portNum
The listening port number; |
Fields inherited from class org.objectweb.dream.AbstractComponent |
bindingLogger, componentDesc, fcState, lifeCycleLogger, logger, weaveableC |
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
STARTED, STOPPED |
Constructor Summary | |
AbstractTCPChannelInImpl()
|
Method Summary | |
void |
bindFc(String clientItfName,
Object serverItf)
|
protected ServerSocket |
createServerSocket(int port)
This method creates and returns a server socket which uses all network interfaces on the host, and is bound to the specified port. |
int |
getListeningPort()
Returns the listening port. |
int |
getOpenRetry()
Returns the number of attempts to open a ServerSocket
before aborting. |
String[] |
listFc()
|
protected void |
sendAck(Socket socket)
Does not do anything. |
void |
setListeningPort(int port)
Sets the listening port. |
void |
setOpenRetry(int retry)
Sets the number of attempts to open a ServerSocket before
aborting. |
protected void |
setSocketOption(Socket sock)
Configures this socket using the socket options established for this factory. |
Methods inherited from class org.objectweb.dream.AbstractComponent |
getFcState, initComponent, lookupFc, setLogger, startFc, stopFc, unbindFc |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected Push outPushItf
protected MessageCodec messageCodecItf
protected int portNum
protected int openRetry
Constructor Detail |
public AbstractTCPChannelInImpl()
Method Detail |
public int getListeningPort()
IPChannelInAttributeController
getListeningPort
in interface IPChannelInAttributeController
IPChannelInAttributeController.getListeningPort()
public void setListeningPort(int port) throws IllegalLifeCycleException
IPChannelInAttributeController
setListeningPort
in interface IPChannelInAttributeController
port
- the listening port.
IllegalLifeCycleException
- cannot change port number if the
component is started.IPChannelInAttributeController.setListeningPort(int)
public int getOpenRetry()
IPChannelInAttributeController
ServerSocket
before aborting.
getOpenRetry
in interface IPChannelInAttributeController
ServerSocket
before aborting.IPChannelInAttributeController.getOpenRetry()
public void setOpenRetry(int retry)
IPChannelInAttributeController
ServerSocket
before
aborting.
setOpenRetry
in interface IPChannelInAttributeController
retry
- the number of attempts to open a
ServerSocket
before aborting.IPChannelInAttributeController.setOpenRetry(int)
public String[] listFc()
listFc
in interface BindingController
BindingController.listFc()
public void bindFc(String clientItfName, Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException
bindFc
in interface BindingController
NoSuchInterfaceException
IllegalBindingException
IllegalLifeCycleException
BindingController.bindFc(String,
Object)
protected void sendAck(Socket socket) throws IOException
socket
-
IOException
protected ServerSocket createServerSocket(int port) throws IOException
port
- the port to listen to.
IOException
- for networking errorsprotected void setSocketOption(Socket sock) throws SocketException
sock
- the socket.
SocketException
- for networking errors
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |