public class TCPServerChannelProxy extends Object implements IChannelProxy
ChannelInlet and a number
of ChannelOutlet that reside either within the same virtual machine's address space
or in different machines, through a TCP streamIChannelProxy.ProxyConnector| Modifier | Constructor and Description |
|---|---|
protected |
TCPServerChannelProxy()
Instantiates a new TCP server channel proxy to be used on the
ChannelInlet side |
|
TCPServerChannelProxy(IChannelLocator Locator,
String NozzleID)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
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
|
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. |
Boolean |
StillConnected()
Depending on the side the
IChannelProxy mediates for, this method has a slightly different
meaning. |
protected TCPServerChannelProxy()
ChannelInlet sideConfig - the configurationpublic TCPServerChannelProxy(IChannelLocator Locator, 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 nozzlepublic Boolean CanHandleProxyLocator(IChannelLocator.LocatorType Locator)
IChannelProxyCanHandleProxyLocator in interface IChannelProxyLocator - The type of Locatorpublic ChannelState GetChannelState()
IChannelProxyChannelState that the proxy mediates for and is used to synchronize
between the various instances of the ChannelState all connected nozzles useGetChannelState in interface IChannelProxypublic void Dispose()
IChannelProxyDispose in interface IChannelProxypublic IChannelLocator GetLocator()
IChannelProxyGetLocator in interface IChannelProxypublic IChannelProxy.ProxyConnector GetProxyType()
IChannelProxyGetProxyType in interface IChannelProxypublic void SetChannelRegistryKey(ChannelRegistryKey RegistryKey)
IChannelProxyChannelRegistryKey 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 IChannelProxyRegistryKey - the registry keypublic Boolean HasConnected()
IChannelProxyIChannelProxy 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 IChannelProxypublic Boolean StillConnected()
IChannelProxyIChannelProxy 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 trueStillConnected in interface IChannelProxyCopyright © 2018. All Rights Reserved.