Class QuickfixjEndpoint
- java.lang.Object
-
- org.apache.camel.support.service.BaseService
-
- org.apache.camel.support.service.ServiceSupport
-
- org.apache.camel.support.DefaultEndpoint
-
- org.apache.camel.component.quickfixj.QuickfixjEndpoint
-
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,QuickfixjEventListener,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.MultipleConsumersSupport,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasId,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="2.1.0", scheme="quickfix", title="QuickFix", syntax="quickfix:configurationName", category=MESSAGING) public class QuickfixjEndpoint extends org.apache.camel.support.DefaultEndpoint implements QuickfixjEventListener, org.apache.camel.MultipleConsumersSupportOpen a Financial Interchange (FIX) session using an embedded QuickFix/J engine.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDATA_DICTIONARY_KEYstatic StringEVENT_CATEGORY_KEYstatic StringMESSAGE_TYPE_KEYstatic StringSESSION_ID_KEY
-
Constructor Summary
Constructors Constructor Description QuickfixjEndpoint(QuickfixjEngine engine, String uri, org.apache.camel.Component component)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor)org.apache.camel.ProducercreateProducer()protected voiddoStop()voidensureInitialized()Initializing and starts the engine if it wasn't initialized so far.StringgetConfigurationName()QuickfixjEnginegetEngine()quickfix.SessionIDgetSessionID()booleanisLazyCreateEngine()booleanisMultipleConsumersSupported()voidonEvent(QuickfixjEventCategory eventCategory, quickfix.SessionID sessionID, quickfix.Message message)voidsetConfigurationName(String configurationName)The configFile is the name of the QuickFIX/J configuration to use for the FIX engine (located as a resource found in your classpath).voidsetLazyCreateEngine(boolean lazyCreateEngine)This option allows to create QuickFIX/J engine on demand.voidsetSessionID(quickfix.SessionID sessionID)The optional sessionID identifies a specific FIX session.-
Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, doStart, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBasicPropertyBinding, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isSingleton, isSynchronous, setBasicPropertyBinding, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
-
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
EVENT_CATEGORY_KEY
public static final String EVENT_CATEGORY_KEY
- See Also:
- Constant Field Values
-
SESSION_ID_KEY
public static final String SESSION_ID_KEY
- See Also:
- Constant Field Values
-
MESSAGE_TYPE_KEY
public static final String MESSAGE_TYPE_KEY
- See Also:
- Constant Field Values
-
DATA_DICTIONARY_KEY
public static final String DATA_DICTIONARY_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
QuickfixjEndpoint
public QuickfixjEndpoint(QuickfixjEngine engine, String uri, org.apache.camel.Component component)
-
-
Method Detail
-
getSessionID
public quickfix.SessionID getSessionID()
-
setSessionID
public void setSessionID(quickfix.SessionID sessionID)
The optional sessionID identifies a specific FIX session. The format of the sessionID is: (BeginString):(SenderCompID)[/(SenderSubID)[/(SenderLocationID)]]->(TargetCompID)[/(TargetSubID)[/(TargetLocationID)]]
-
getConfigurationName
public String getConfigurationName()
-
setConfigurationName
public void setConfigurationName(String configurationName)
The configFile is the name of the QuickFIX/J configuration to use for the FIX engine (located as a resource found in your classpath).
-
isLazyCreateEngine
public boolean isLazyCreateEngine()
-
setLazyCreateEngine
public void setLazyCreateEngine(boolean lazyCreateEngine)
This option allows to create QuickFIX/J engine on demand. Value true means the engine is started when first message is send or there's consumer configured in route definition. When false value is used, the engine is started at the endpoint creation. When this parameter is missing, the value of component's property lazyCreateEngines is being used.
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception- Specified by:
createConsumerin interfaceorg.apache.camel.Endpoint- Throws:
Exception
-
createProducer
public org.apache.camel.Producer createProducer() throws Exception- Specified by:
createProducerin interfaceorg.apache.camel.Endpoint- Throws:
Exception
-
onEvent
public void onEvent(QuickfixjEventCategory eventCategory, quickfix.SessionID sessionID, quickfix.Message message) throws Exception
- Specified by:
onEventin interfaceQuickfixjEventListener- Throws:
Exception
-
isMultipleConsumersSupported
public boolean isMultipleConsumersSupported()
- Specified by:
isMultipleConsumersSupportedin interfaceorg.apache.camel.MultipleConsumersSupport
-
ensureInitialized
public void ensureInitialized() throws ExceptionInitializing and starts the engine if it wasn't initialized so far.- Throws:
Exception
-
getEngine
public QuickfixjEngine getEngine()
-
-