gr.uoa.di.madgik.commons.channel.proxy.tcp
Class TCPServerNozzleConfig

java.lang.Object
  extended by gr.uoa.di.madgik.commons.channel.proxy.tcp.TCPServerNozzleConfig
All Implemented Interfaces:
INozzleConfig

public class TCPServerNozzleConfig
extends java.lang.Object
implements INozzleConfig

This class provides configuration on the creation of a new channel through a ChannelInlet. This configuration dictates the creation of a channel that can be accessed either locally or remotely through a TCP connection

Author:
gpapanikos

Nested Class Summary
 
Nested classes/interfaces inherited from interface gr.uoa.di.madgik.commons.channel.nozzle.INozzleConfig
INozzleConfig.ConfigType
 
Constructor Summary
TCPServerNozzleConfig()
           
TCPServerNozzleConfig(boolean Broadcast, int RestrictBroadcast)
          Instantiates a new TCP nozzle configuration
 
Method Summary
 void Dispose()
          Disposes the configuration and all underlying state
 void FromXML(org.w3c.dom.Node XML)
           
 void FromXML(java.lang.String XML)
           
 IChannelProxy GetChannelProxy()
          Gets the channel proxy.
 INozzleConfig.ConfigType GetConfigType()
           
 boolean GetIsBroadcast()
          Retrieves whether the channel supports multiple connected ChannelOutlet instances
 int GetRestrictBroadcast()
          Retrieves the maximum number of connected to the channel ChannelOutlet instances if the channel supports multiple instances as set by the INozzleConfig.SetIsBroadcast(boolean).
 void SetIsBroadcast(boolean Broadcast)
          Sets whether the channel supports multiple connected ChannelOutlet instances
 void SetProxy(IChannelProxy ChannelProxy)
          Sets the proxy.
 void SetRestrictBroadcast(int RestrictBroadcast)
          Sets the maximum number of connected to the channel ChannelOutlet instances if the channel supports multiple instances as set by the INozzleConfig.SetIsBroadcast(boolean).
 java.lang.String ToXML()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCPServerNozzleConfig

public TCPServerNozzleConfig()

TCPServerNozzleConfig

public TCPServerNozzleConfig(boolean Broadcast,
                             int RestrictBroadcast)
Instantiates a new TCP nozzle configuration

Parameters:
Config - the configuration of the TCPTransportServer
Broadcast - the value to set as defined by the INozzleConfig.SetIsBroadcast(boolean)
RestrictBroadcast - the value to set as defined by the INozzleConfig.SetRestrictBroadcast(int)
Method Detail

GetChannelProxy

public IChannelProxy GetChannelProxy()
Description copied from interface: INozzleConfig
Gets the channel proxy.

Specified by:
GetChannelProxy in interface INozzleConfig
Returns:
the channel proxy

SetProxy

public void SetProxy(IChannelProxy ChannelProxy)
Description copied from interface: INozzleConfig
Sets the proxy.

Specified by:
SetProxy in interface INozzleConfig
Parameters:
ChannelProxy - the channel proxy

GetIsBroadcast

public boolean GetIsBroadcast()
Description copied from interface: INozzleConfig
Retrieves whether the channel supports multiple connected ChannelOutlet instances

Specified by:
GetIsBroadcast in interface INozzleConfig
Returns:
true, if the multiple ChannelOutlet instances can be connected

SetIsBroadcast

public void SetIsBroadcast(boolean Broadcast)
Description copied from interface: INozzleConfig
Sets whether the channel supports multiple connected ChannelOutlet instances

Specified by:
SetIsBroadcast in interface INozzleConfig
Parameters:
Broadcast - whether the channel supports multiple connected ChannelOutlet instances

GetRestrictBroadcast

public int GetRestrictBroadcast()
Description copied from interface: INozzleConfig
Retrieves the maximum number of connected to the channel ChannelOutlet instances if the channel supports multiple instances as set by the INozzleConfig.SetIsBroadcast(boolean). In case a non positive number is provided, no restrictions are enforced.

Specified by:
GetRestrictBroadcast in interface INozzleConfig
Returns:
the number of simultaneously connected ChannelOutlet instances to allow

SetRestrictBroadcast

public void SetRestrictBroadcast(int RestrictBroadcast)
Description copied from interface: INozzleConfig
Sets the maximum number of connected to the channel ChannelOutlet instances if the channel supports multiple instances as set by the INozzleConfig.SetIsBroadcast(boolean). In case a non positive number is provided, no restrictions are enforced.

Specified by:
SetRestrictBroadcast in interface INozzleConfig
Parameters:
RestrictBroadcast - the number of simultaneously connected ChannelOutlet instances to allow

Dispose

public void Dispose()
Description copied from interface: INozzleConfig
Disposes the configuration and all underlying state

Specified by:
Dispose in interface INozzleConfig

GetConfigType

public INozzleConfig.ConfigType GetConfigType()
Specified by:
GetConfigType in interface INozzleConfig

FromXML

public void FromXML(java.lang.String XML)
             throws java.lang.Exception
Specified by:
FromXML in interface INozzleConfig
Throws:
java.lang.Exception

FromXML

public void FromXML(org.w3c.dom.Node XML)
             throws java.lang.Exception
Specified by:
FromXML in interface INozzleConfig
Throws:
java.lang.Exception

ToXML

public java.lang.String ToXML()
                       throws java.lang.Exception
Specified by:
ToXML in interface INozzleConfig
Throws:
java.lang.Exception