org.apache.synapse.transport.fix
Class FIXTransportListener

java.lang.Object
  extended by org.apache.axis2.transport.base.AbstractTransportListener
      extended by org.apache.synapse.transport.fix.FIXTransportListener
All Implemented Interfaces:
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, workerPool
 
Fields inherited from interface org.apache.axis2.transport.TransportListener
HOST_ADDRESS, PARAM_PORT
 
Constructor Summary
FIXTransportListener()
           
 
Method Summary
 EndpointReference[] getEPRsForService(String serviceName, String ip)
          Returns EPRs for the given service and IP over the FIX transport
 void init(ConfigurationContext cfgCtx, TransportInDescription trpInDesc)
          This is the TransportListener initialization method invoked by Axis2
 void startListeningForService(AxisService service)
          Prepare to listen for FIX messages on behalf of the given service by first creating and starting a FIX session
protected  void stopListeningForService(AxisService service)
          Stops listening for messages for the service thats undeployed or stopped by stopping and disposing the appropriate FIX session
 
Methods 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, getTransportName, handleException, handleIncomingMessage, logException, maintenenceShutdown, pause, resetStatistics, resume, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FIXTransportListener

public FIXTransportListener()
Method Detail

init

public void init(ConfigurationContext cfgCtx,
                 TransportInDescription trpInDesc)
          throws AxisFault
This is the TransportListener initialization method invoked by Axis2

Specified by:
init in interface TransportListener
Overrides:
init in class org.apache.axis2.transport.base.AbstractTransportListener
Parameters:
cfgCtx - the Axis configuration context
trpInDesc - the TransportIn description
Throws:
AxisFault

startListeningForService

public void startListeningForService(AxisService service)
Prepare to listen for FIX messages on behalf of the given service by first creating and starting a FIX session

Specified by:
startListeningForService in class org.apache.axis2.transport.base.AbstractTransportListener
Parameters:
service - the service for which to listen for messages

stopListeningForService

protected void stopListeningForService(AxisService service)
Stops listening for messages for the service thats undeployed or stopped by stopping and disposing the appropriate FIX session

Specified by:
stopListeningForService in class org.apache.axis2.transport.base.AbstractTransportListener
Parameters:
service - the service that was undeployed or stopped

getEPRsForService

public EndpointReference[] getEPRsForService(String serviceName,
                                             String ip)
                                      throws AxisFault
Returns EPRs for the given service and IP over the FIX transport

Specified by:
getEPRsForService in interface TransportListener
Overrides:
getEPRsForService in class org.apache.axis2.transport.base.AbstractTransportListener
Parameters:
serviceName - service name
ip - ignored
Returns:
the EPR for the service
Throws:
AxisFault


Copyright © 2005-2012 Apache Software Foundation. All Rights Reserved.