Vordel SDK

com.vordel.circuit
Class Circuit

java.lang.Object
  extended by com.vordel.circuit.Circuit

public class Circuit
extends java.lang.Object

Consists of a network of FilterContainers, linked as they will be executed by the server.

In addition to a nominally connected network of nodes, a Circuit may also be configured with a specific filter designated its "Fault Handler", which will be passed the message during server processing if an exception is raised by the circuit while processing that message.

The underlying type of each FilterContainer is dictated by the factory with which the Circuit is initially constructed. Generally, all FilterContainers in a Circuit will implement a specific interface required by the user of the Circuit. (For example, VordelSecure server will attach appropriate MessageProcessor objects for each filter.)


Constructor Summary
Circuit()
           
 
Method Summary
 void configure(CircuitCache factory, Entity circuitEntity)
          Load the filter containers for each configured filter in this circuit
 void flushCache()
          Remove all filters from this circuit
 Entity getEntity()
          Get the Entity that is used to configure this circuit
 FilterContainer getFaultHandler()
          Retrieve the fault handler for this circuit
 java.util.Collection<FilterContainer> getFilterContainers()
          Get all the FilterContainers in this circuit
 java.util.Map<ESPK,FilterContainer> getFilterContainersMap()
          Get all the filter containers in this circuit
 java.lang.String getName()
          Get the name of the circuit
 FilterContainer getStartFilter()
          Locate the starting point for injecting messages into this circuit.
 void setFaultHandler(FilterContainer handler)
          Set the fault handler for this circuit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Circuit

public Circuit()
Method Detail

getFaultHandler

public FilterContainer getFaultHandler()
Retrieve the fault handler for this circuit

Returns:
a filter container for the fault handler

setFaultHandler

public void setFaultHandler(FilterContainer handler)
Set the fault handler for this circuit

Parameters:
handler - The filter container of the fault handler

getEntity

public Entity getEntity()
Get the Entity that is used to configure this circuit


configure

public void configure(CircuitCache factory,
                      Entity circuitEntity)
               throws EntityStoreException
Load the filter containers for each configured filter in this circuit

Parameters:
factory - The factory to use for creating filter containers for this circuit
circuitEntity - The entity representing this circuit in "store"
Throws:
EntityStoreException

getFilterContainersMap

public java.util.Map<ESPK,FilterContainer> getFilterContainersMap()
Get all the filter containers in this circuit

Returns:
A Map of all FilterContainers in this Circuit, keyed by ESPK

getFilterContainers

public java.util.Collection<FilterContainer> getFilterContainers()
Get all the FilterContainers in this circuit

Returns:
A Collection of all FilterContainers in this Circuit.

getStartFilter

public FilterContainer getStartFilter()
Locate the starting point for injecting messages into this circuit.

Returns:
The filter container marked as the starting point for this circuit.

getName

public java.lang.String getName()
Get the name of the circuit

Returns:
The circuit name

flushCache

public void flushCache()
Remove all filters from this circuit


Vordel SDK


This documentation and all its contents and graphics, copyright ? 1999 - 2010 Vordel