Package org.apache.synapse.transport.fix
Class FIXTransportListener
java.lang.Object
org.apache.axis2.transport.base.AbstractTransportListener
org.apache.synapse.transport.fix.FIXTransportListener
- All Implemented Interfaces:
org.apache.axis2.transport.TransportListener
public class FIXTransportListener
extends org.apache.axis2.transport.base.AbstractTransportListener
The FIX transport listener implementation. A FIX Transport Listner will hold
a FIX session factory, which would be created at initialization
time. This implementation supports the creation of FIX sessions at runtime
as and when required. This FIX Listener registers with Axis to be notified
of service deployment/undeployment/start/stop, and enables or disables
listening for FIX messages on the destinations as appropriate.
Service must state where the FIX configuration file is located so
that the required FIX sessions can be initialized for the service.
FIX configuration file should be a valid Quickfix/J session
configuration file. A URL to the file should be provided.
http://www.mycompany.org/fixconfig/file.cfg
-
Field Summary
Fields inherited from class org.apache.axis2.transport.base.AbstractTransportListener
cfgCtx, config, isNonBlocking, log, metrics, state, useAxis2ThreadPool, workerPoolFields inherited from interface org.apache.axis2.transport.TransportListener
HOST_ADDRESS, PARAM_PORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.axis2.addressing.EndpointReference[]getEPRsForService(String serviceName, String ip) Returns EPRs for the given service and IP over the FIX transportvoidinit(org.apache.axis2.context.ConfigurationContext cfgCtx, org.apache.axis2.description.TransportInDescription trpInDesc) This is the TransportListener initialization method invoked by Axis2voidstartListeningForService(org.apache.axis2.description.AxisService service) Prepare to listen for FIX messages on behalf of the given service by first creating and starting a FIX sessionprotected voidstopListeningForService(org.apache.axis2.description.AxisService service) Stops listening for messages for the service thats undeployed or stopped by stopping and disposing the appropriate FIX sessionMethods inherited from class org.apache.axis2.transport.base.AbstractTransportListener
createMessageContext, destroy, disableTransportForService, getActiveThreadCount, getAvgSizeReceived, getAvgSizeSent, getBytesReceived, getBytesSent, getConfigurationContext, getEPRForService, getEPRsForService, getFaultsReceiving, getFaultsSending, getLastResetTime, getMaxSizeReceived, getMaxSizeSent, getMessagesReceived, getMessagesSent, getMetricsCollector, getMetricsWindow, getMinSizeReceived, getMinSizeSent, getQueueSize, getResponseCodeTable, getSessionContext, getTimeoutsReceiving, getTimeoutsSending, getTransportInDescription, getTransportName, handleException, handleIncomingMessage, logException, maintenenceShutdown, pause, resetStatistics, resume, start, stop
-
Constructor Details
-
FIXTransportListener
public FIXTransportListener()
-
-
Method Details
-
init
public void init(org.apache.axis2.context.ConfigurationContext cfgCtx, org.apache.axis2.description.TransportInDescription trpInDesc) throws org.apache.axis2.AxisFault This is the TransportListener initialization method invoked by Axis2- Specified by:
initin interfaceorg.apache.axis2.transport.TransportListener- Overrides:
initin classorg.apache.axis2.transport.base.AbstractTransportListener- Parameters:
cfgCtx- the Axis configuration contexttrpInDesc- the TransportIn description- Throws:
org.apache.axis2.AxisFault
-
startListeningForService
public void startListeningForService(org.apache.axis2.description.AxisService service) Prepare to listen for FIX messages on behalf of the given service by first creating and starting a FIX session- Specified by:
startListeningForServicein classorg.apache.axis2.transport.base.AbstractTransportListener- Parameters:
service- the service for which to listen for messages
-
stopListeningForService
protected void stopListeningForService(org.apache.axis2.description.AxisService service) Stops listening for messages for the service thats undeployed or stopped by stopping and disposing the appropriate FIX session- Specified by:
stopListeningForServicein classorg.apache.axis2.transport.base.AbstractTransportListener- Parameters:
service- the service that was undeployed or stopped
-
getEPRsForService
public org.apache.axis2.addressing.EndpointReference[] getEPRsForService(String serviceName, String ip) throws org.apache.axis2.AxisFault Returns EPRs for the given service and IP over the FIX transport- Specified by:
getEPRsForServicein interfaceorg.apache.axis2.transport.TransportListener- Overrides:
getEPRsForServicein classorg.apache.axis2.transport.base.AbstractTransportListener- Parameters:
serviceName- service nameip- ignored- Returns:
- the EPR for the service
- Throws:
org.apache.axis2.AxisFault
-