org.apache.synapse
Class SynapseEnvironment

java.lang.Object
  extended byorg.apache.synapse.SynapseEnvironment
Direct Known Subclasses:
Axis2SynapseEnvironment

public abstract class SynapseEnvironment
extends java.lang.Object

Common stuff needed to embed Synapse into a given runtime (e.g. Axis2)

This interface is used by the processors, and also by EnvironmentAware mediators


Field Summary
protected  SynapseEnvironment parent
           
protected  java.util.Map properties
           
 
Constructor Summary
protected SynapseEnvironment(SynapseEnvironment parent)
           
 
Method Summary
abstract  void addProcessor(Processor p)
          This is how you add a processor to the list of processors.
abstract  java.lang.ClassLoader getClassLoader()
           
abstract  Processor getMasterProcessor()
          This returns the "Master Processor" which is the root processor for this instance of Synapse.
 SynapseEnvironment getParent()
           
 java.lang.Object getProperty(java.lang.String key)
          Retrieves an object given a key.
abstract  void injectMessage(SynapseMessage smc)
           
abstract  Processor lookupProcessor(java.lang.String name)
          This is used by the references to find a processor with a given name
abstract  void send(SynapseMessage smc, SynapseEnvironment se)
          This method allows you send messages on.
abstract  void setMasterProcessor(Processor p)
          This sets the root processor for the engine.
 void setParent(SynapseEnvironment parent)
           
 void setProperty(java.lang.String key, java.lang.Object value)
          Store a property for message context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected SynapseEnvironment parent

properties

protected java.util.Map properties
Constructor Detail

SynapseEnvironment

protected SynapseEnvironment(SynapseEnvironment parent)
Method Detail

getParent

public SynapseEnvironment getParent()

setParent

public void setParent(SynapseEnvironment parent)

getProperty

public java.lang.Object getProperty(java.lang.String key)
Retrieves an object given a key.

Parameters:
key - - if not found, will return null
Returns:
Returns the property.

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
Store a property for message context

Parameters:
key -
value -

injectMessage

public abstract void injectMessage(SynapseMessage smc)

getClassLoader

public abstract java.lang.ClassLoader getClassLoader()

send

public abstract void send(SynapseMessage smc,
                          SynapseEnvironment se)
This method allows you send messages on. As opposed to injectMessage send message does not process these through Synapse.

This will send request messages on, and send response messages back to the client


lookupProcessor

public abstract Processor lookupProcessor(java.lang.String name)
This is used by the references to find a processor with a given name


addProcessor

public abstract void addProcessor(Processor p)
This is how you add a processor to the list of processors. The name which it can be retrieved by is the processor.getName()


getMasterProcessor

public abstract Processor getMasterProcessor()
This returns the "Master Processor" which is the root processor for this instance of Synapse. Usually this would be the processor derived from <synapse>.


setMasterProcessor

public abstract void setMasterProcessor(Processor p)
This sets the root processor for the engine.