|
||||||||||
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.SocketManagerIPStaticImpl
Socket manager managing only one open socket at a time. Socket is retrieved
using a IPSocketManager
, the IP and port value are set with the
SocketManagerIPStaticAttributeController
attribute controller
interface.
Field Summary | |
protected SocketState |
currentSocket
|
protected IPSocketManager |
delegateSocketManagerItf
|
protected InetAddress |
destinationAddress
|
protected boolean |
destinationChanged
|
protected int |
destinationPort
|
protected boolean |
inUse
|
Fields inherited from class org.objectweb.dream.AbstractComponent |
bindingLogger, componentDesc, fcState, firstStart, lifeCycleLogger, logger, weaveableC |
Fields inherited from interface org.objectweb.dream.channel.SocketManager |
ITF_NAME |
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController |
STARTED, STOPPED |
Constructor Summary | |
SocketManagerIPStaticImpl()
|
Method Summary | |
void |
bindFc(String clientItfName,
Object serverItf)
|
String |
getDestinationHostname()
Returns the destination hostname. |
int |
getDestinationPort()
Returns the destination port. |
SocketState |
getSocket(Message message)
Returns a socket that can be used to send message to a ChannelIn |
String[] |
listFc()
|
void |
releaseSocket(SocketState socketState,
boolean error)
Releases the given SocketState . |
void |
setDestinationHostname(String hostname)
Sets the destinationHostname attribute value. |
void |
setDestinationPort(int port)
Sets the destinationPort attribute value. |
void |
stopFc()
|
Methods inherited from class org.objectweb.dream.AbstractComponent |
beforeFirstStart, getFcState, initComponent, lookupFc, setLogger, startFc, unbindFc |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean destinationChanged
protected boolean inUse
protected SocketState currentSocket
protected InetAddress destinationAddress
protected int destinationPort
protected IPSocketManager delegateSocketManagerItf
Constructor Detail |
public SocketManagerIPStaticImpl()
Method Detail |
public SocketState getSocket(Message message) throws IOException, InterruptedException
SocketManager
getSocket
in interface SocketManager
message
- a message that is going to be sent to a ChannelIn
InterruptedException
- if the component is interrupted while waiting.
IOException
- if the socket can't be opened.SocketManager.getSocket(Message)
public void releaseSocket(SocketState socketState, boolean error)
SocketManager
SocketState
.
releaseSocket
in interface SocketManager
socketState
- the socket state to release.error
- true
if an exception has been catched while
sending the message, false
otherwise.SocketManager.releaseSocket(SocketState, boolean)
public String getDestinationHostname()
SocketManagerIPStaticAttributeController
getDestinationHostname
in interface SocketManagerIPStaticAttributeController
destinationHostname
attribute value.SocketManagerIPStaticAttributeController.getDestinationHostname()
public void setDestinationHostname(String hostname) throws UnknownHostException
SocketManagerIPStaticAttributeController
destinationHostname
attribute value.
setDestinationHostname
in interface SocketManagerIPStaticAttributeController
hostname
- the new destinationHostname
attribute value.
UnknownHostException
- if the given hostname can't be resolved.SocketManagerIPStaticAttributeController.setDestinationHostname(String)
public int getDestinationPort()
SocketManagerIPStaticAttributeController
getDestinationPort
in interface SocketManagerIPStaticAttributeController
destinationPort
attribute value.SocketManagerIPStaticAttributeController.getDestinationPort()
public void setDestinationPort(int port)
SocketManagerIPStaticAttributeController
destinationPort
attribute value.
setDestinationPort
in interface SocketManagerIPStaticAttributeController
port
- the new destinationPort
attribute value.SocketManagerIPStaticAttributeController.setDestinationPort(int)
public void stopFc() throws IllegalLifeCycleException
stopFc
in interface LifeCycleController
IllegalLifeCycleException
LifeCycleController.stopFc()
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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |