Prism.extensions.connector
Class ExtensibleConnector

java.lang.Object
  extended by Prism.core.Brick
      extended by Prism.core.Connector
          extended by Prism.extensions.connector.ExtensibleConnector
All Implemented Interfaces:
java.io.Serializable, IBrick, IConnector

public class ExtensibleConnector
extends Connector

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface Prism.core.IConnector
INITIAL_SIZE_OF_BRICK_QUEUE
 
Constructor Summary
ExtensibleConnector()
          This constructor creates an connector with default parameters.
ExtensibleConnector(AbstractScaffold scaffold)
          This constructor sets the scaffold of this connector to scaffold.
ExtensibleConnector(int style)
          This constructor sets the style of this connector to style.
ExtensibleConnector(java.lang.String name)
          This constructor sets the name of this connector to name.
ExtensibleConnector(java.lang.String name, int style, AbstractScaffold scaffold)
          Initializes the name, style, and scaffold of this connector.
 
Method Summary
 void addHandler(AbstractHandler handler)
          Sets the handler of this connector.
 AbstractHandler getEvtHandler()
          Gets the IHandler of this connector.
 void handle(Event e)
          This method distributes the incoming event to connected Bricks.
 
Methods inherited from class Prism.core.Connector
addPort, getPorts, removePort, start
 
Methods inherited from class Prism.core.Brick
add, getName, getScaffold, getStyle, setName, setScaffold
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface Prism.core.IBrick
add, getName, getScaffold, getStyle, setName, setScaffold
 

Constructor Detail

ExtensibleConnector

public ExtensibleConnector()
This constructor creates an connector with default parameters.


ExtensibleConnector

public ExtensibleConnector(java.lang.String name)
This constructor sets the name of this connector to name.

Parameters:
name - The name of this connector. It cannot be a null value.

ExtensibleConnector

public ExtensibleConnector(int style)
This constructor sets the style of this connector to style.

Parameters:
style - The style of this connector.

ExtensibleConnector

public ExtensibleConnector(AbstractScaffold scaffold)
This constructor sets the scaffold of this connector to scaffold.

Parameters:
scaffold - The scaffold of this connector.

ExtensibleConnector

public ExtensibleConnector(java.lang.String name,
                           int style,
                           AbstractScaffold scaffold)
Initializes the name, style, and scaffold of this connector.

Parameters:
name - The name of this connector.
style - The style of this connector.
scaffold - The scaffold of this connector.
Method Detail

addHandler

public void addHandler(AbstractHandler handler)
Sets the handler of this connector.

Parameters:
handler - Handler object that determines the distribution policy

getEvtHandler

public AbstractHandler getEvtHandler()
Gets the IHandler of this connector.

Returns:
AbstractHandler Handler object that determines the distribution policy

handle

public void handle(Event e)
This method distributes the incoming event to connected Bricks. Distribution policy depends on the type of IHandler that is installed.

Specified by:
handle in interface IBrick
Specified by:
handle in interface IConnector
Overrides:
handle in class Connector
Parameters:
e - Incoming Event