|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.synapse.transport.fix.FIXSessionFactory
public class 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.
Method Summary | |
---|---|
boolean |
createFIXAcceptor(AxisService service)
Get the FIX configuration settings and initialize a new FIX session for the specified service. |
boolean |
createFIXInitiator(AxisService service)
|
void |
createFIXInitiator(String fixEPR,
AxisService service,
quickfix.SessionID sessionID)
Extract the parameters embedded in the given EPR and initialize a new FIX session. |
void |
disposeFIXAcceptor(AxisService service)
Get the FIX Acceptor for the specified service from the sessionStore Map and stop it. |
void |
disposeFIXInitiators()
Stops all the FIX initiators created so far and cleans up all the mappings related to them |
quickfix.Acceptor |
getAcceptor(String serviceName)
Finds a FIX Acceptor for the specified service from the acceptorStore |
quickfix.Application |
getApplication(String fixEPR)
|
quickfix.Initiator |
getInitiator(String fixEPR)
Finds a FIX initiator for the specified EPR from the initiatorStore |
static FIXSessionFactory |
getInstance(FIXApplicationFactory af)
|
String[] |
getServiceEPRs(String serviceName,
String ip)
Returns an array of Strings representing EPRs for the specified service |
void |
setListenerThreadPool(org.apache.axis2.transport.base.threads.WorkerPool listenerThreadPool)
|
void |
setSenderThreadPool(org.apache.axis2.transport.base.threads.WorkerPool senderThreadPool)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static FIXSessionFactory getInstance(FIXApplicationFactory af)
public boolean createFIXAcceptor(AxisService service) throws AxisFault
service
- the AxisService
AxisFault
- if the acceptor cannot be createdpublic void createFIXInitiator(String fixEPR, AxisService service, quickfix.SessionID sessionID) throws AxisFault
fixEPR
- the EPR to send FIX messagesservice
- the AxisServicesessionID
- the SessionID of the session created
AxisFault
- Exception thrownpublic boolean createFIXInitiator(AxisService service) throws AxisFault
AxisFault
public void disposeFIXAcceptor(AxisService service)
service
- the AxisServicepublic void disposeFIXInitiators()
public String[] getServiceEPRs(String serviceName, String ip)
serviceName
- the name of the serviceip
- the IP address of the host
public quickfix.Acceptor getAcceptor(String serviceName)
serviceName
- the name of the AxisService
public quickfix.Initiator getInitiator(String fixEPR)
fixEPR
- a valid FIX EPR
public quickfix.Application getApplication(String fixEPR)
public void setListenerThreadPool(org.apache.axis2.transport.base.threads.WorkerPool listenerThreadPool)
public void setSenderThreadPool(org.apache.axis2.transport.base.threads.WorkerPool senderThreadPool)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |