|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgr.uoa.di.madgik.commons.channel.proxy.tcp.TCPServerChannelProxy
public class TCPServerChannelProxy
Defines a local proxy capable of mediating between an ChannelInlet
and a number
of ChannelOutlet
that reside either within the same virtual machine's address space
or in different machines, through a TCP stream
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface gr.uoa.di.madgik.commons.channel.proxy.IChannelProxy |
---|
IChannelProxy.ProxyConnector |
Constructor Summary | |
---|---|
TCPServerChannelProxy(IChannelLocator Locator,
java.lang.String NozzleID)
Creates a new instance. |
Method Summary | |
---|---|
java.lang.Boolean |
CanHandleProxyLocator(IChannelLocator.LocatorType Locator)
Checks if this proxy can handle the specific type of locator |
void |
Dispose()
Disposes the proxy |
ChannelState |
GetChannelState()
Retrieves the ChannelState that the proxy mediates for and is used to synchronize
between the various instances of the ChannelState all connected nozzles use |
IChannelLocator |
GetLocator()
Retrieves a locator to this proxy |
IChannelProxy.ProxyConnector |
GetProxyType()
Retrieves the type of proxy |
java.lang.Boolean |
HasConnected()
Depending on the side the IChannelProxy mediates for, this method has a slightly different
meaning. |
void |
SetChannelRegistryKey(ChannelRegistryKey RegistryKey)
Sets the ChannelRegistryKey this proxy will manage. |
java.lang.Boolean |
StillConnected()
Depending on the side the IChannelProxy mediates for, this method has a slightly different
meaning. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TCPServerChannelProxy(IChannelLocator Locator, java.lang.String NozzleID)
ChannelOutlet
side. A call to IChannelProxy.CanHandleProxyLocator(gr.uoa.di.madgik.commons.channel.proxy.IChannelLocator.LocatorType)
is made to check if the locator provided can be used with this proxy instantiation. The locator that can be used with this
proxy must be of type TCPChannelLocator
. If either of the the two above conditions do not hold, an exception
is thrown. The protocol thread is started and it is passed to it a socket connected to the end point that the provided
IChannelLocator
point to.
Locator
- The locator this proxy should use as returned by the inlet's proxy IChannelProxy.GetLocator()
NozzleID
- the id of the outlet nozzleMethod Detail |
---|
public java.lang.Boolean CanHandleProxyLocator(IChannelLocator.LocatorType Locator)
IChannelProxy
CanHandleProxyLocator
in interface IChannelProxy
Locator
- The type of Locator
public ChannelState GetChannelState()
IChannelProxy
ChannelState
that the proxy mediates for and is used to synchronize
between the various instances of the ChannelState
all connected nozzles use
GetChannelState
in interface IChannelProxy
public void Dispose()
IChannelProxy
Dispose
in interface IChannelProxy
public IChannelLocator GetLocator()
IChannelProxy
GetLocator
in interface IChannelProxy
public IChannelProxy.ProxyConnector GetProxyType()
IChannelProxy
GetProxyType
in interface IChannelProxy
public void SetChannelRegistryKey(ChannelRegistryKey RegistryKey)
IChannelProxy
ChannelRegistryKey
this proxy will manage. This method is called by the
ChannelRegistry.Register(ChannelState, INozzleConfig, String)
when called by the ChannelInlet
initialization constructor. This proxy instance is
passed to the nozzle's constructor through the INozzleConfig
and is updated by calling
the IChannelProxy.SetChannelRegistryKey(ChannelRegistryKey)
from the registry's method.
SetChannelRegistryKey
in interface IChannelProxy
RegistryKey
- the registry keypublic java.lang.Boolean HasConnected()
IChannelProxy
IChannelProxy
mediates for, this method has a slightly different
meaning. On the inlet side, it checks if any outlets has been connected to the exposed channel.
On the outlet side, it checks if the outlet has been connected to the inlet.
HasConnected
in interface IChannelProxy
public java.lang.Boolean StillConnected()
IChannelProxy
IChannelProxy
mediates for, this method has a slightly different
meaning. On the inlet side, it checks if any outlets is still connected to the exposed channel.
On the outlet side, it checks if the outlet is still connected to the inlet. This method should
only be used after the IChannelProxy.HasConnected()
has already been set to true
StillConnected
in interface IChannelProxy
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |