Home » synapse-1.2-src » org.apache.synapse.transport.fix » [javadoc | source]
org.apache.synapse.transport.fix
public class: FIXSessionFactory [javadoc | source]
java.lang.Object
   org.apache.synapse.transport.fix.FIXSessionFactory
The FIXSessionFactory is responsible for creating and managing FIX sessions. A FIX session can be initiated in one of two modes, namely the acceptor mode and the initiator mode. FIX sessions requested by the transport listener at service deployment are created in acceptor mode. When the transport sender is about to send a FIX message it will check whether a valid FIX session exists. If not it will request the FIXSessionFactory to create a new session in the initiator mode.

To create a new FIX session (in either mode) the FIXSessionFactory has to create a LogFactory (nullable), and a MessageStoreFactroy. By default this implementation attempts to pass null as the LogFactory and a MemoryStoreFactory as the MessageStoreFactory. These can be configured in the services.xml as follows.

file (acceptable values: console, file, jdbc)

file (acceptable values: file, jdbc, memory, sleepycat)

The configuraion details related to these factories has to be specified in the FIX configuration file as requested by the Quickfix/J API.
Constructor:
 public FIXSessionFactory(FIXApplicationFactory applicationFactory) 
Method from org.apache.synapse.transport.fix.FIXSessionFactory Summary:
createFIXAcceptor,   createFIXInitiator,   disposeFIXAcceptor,   getAccepter,   getApplication,   getInitiator,   getServiceEPRs
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.synapse.transport.fix.FIXSessionFactory Detail:
 public  void createFIXAcceptor(AxisService service) 
    Get the FIX configuration settings and initialize a new FIX session for the specified service. Create an Acceptor and a new FIX Application. Put the Acceptor into the acceptorStore keyed by the service name and start it.
 public  void createFIXInitiator(String fixEPR,
    AxisService service,
    SessionID sessionID) throws AxisFault 
    Extract the parameters embedded in the given EPR and initialize a new FIX session. Create a new FIX initiator and a new FIX Application.Put the initiator into the initiatorStore keyed by the EPR and start the initiator.
 public  void disposeFIXAcceptor(AxisService service) 
    Get the FIX Acceptor for the specified service from the sessionStore Map and stop it. Then remove the Acceptor from the Map.
 public Acceptor getAccepter(String serviceName) 
    Finds a FIX Acceptor for the specified service from the acceptorStore
 public Application getApplication(String fixEPR) 
 public Initiator getInitiator(String fixEPR) 
    Finds a FIX initiator for the specified EPR from the initiatorStore
 public String[] getServiceEPRs(String serviceName,
    String ip) 
    Returns an array of Strings representing EPRs for the specified service