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.ComponentAware,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.MultipleConsumersSupport,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasCamelContext,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,
headersClass=QuickfixjEndpoint.class)
public class QuickfixjEndpoint
extends org.apache.camel.support.DefaultEndpoint
implements QuickfixjEventListener, org.apache.camel.MultipleConsumersSupport
Open a Financial Interchange (FIX) session using an embedded QuickFix/J engine.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsConstructorDescriptionQuickfixjEndpoint(QuickfixjEngine engine, String uri, org.apache.camel.Component component) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddConsumer(QuickfixjConsumer consumer) protected voidorg.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor) org.apache.camel.Producerprotected voiddoStop()voidInitializing and starts the engine if it wasn't initialized so far.quickfix.SessionIDgetSID()booleanbooleanvoidonEvent(QuickfixjEventCategory eventCategory, quickfix.SessionID sessionID, quickfix.Message message) protected voidremoveConsumer(QuickfixjConsumer consumer) protected voidvoidsetConfigurationName(String configurationName) Path to the quickfix configuration file.voidsetLazyCreateEngine(boolean lazyCreateEngine) This option allows creating QuickFIX/J engine on demand.voidsetSessionID(String sessionID) The optional sessionID identifies a specific FIX session.Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toStringMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.ComponentAware
getComponentMethods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isSingletonProducerMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Field Details
-
EVENT_CATEGORY_KEY
@Metadata(description="The event category.", javaType="org.apache.camel.component.quickfixj.QuickfixjEventCategory") public static final String EVENT_CATEGORY_KEY- See Also:
-
SESSION_ID_KEY
@Metadata(description="The FIX message SessionID.", javaType="quickfix.SessionID") public static final String SESSION_ID_KEY- See Also:
-
MESSAGE_TYPE_KEY
@Metadata(description="The FIX MsgType tag value.", javaType="String") public static final String MESSAGE_TYPE_KEY- See Also:
-
DATA_DICTIONARY_KEY
- See Also:
-
-
Constructor Details
-
QuickfixjEndpoint
-
-
Method Details
-
getComponent
- Specified by:
getComponentin interfaceorg.apache.camel.ComponentAware- Overrides:
getComponentin classorg.apache.camel.support.DefaultEndpoint
-
getSessionID
-
getSID
public quickfix.SessionID getSID() -
setSessionID
The optional sessionID identifies a specific FIX session. The format of the sessionID is: (BeginString):(SenderCompID)[/(SenderSubID)[/(SenderLocationID)]]->(TargetCompID)[/(TargetSubID)[/(TargetLocationID)]] -
getConfigurationName
-
setConfigurationName
Path to the quickfix configuration file. You can prefix with: classpath, file, http, ref, or bean. classpath, file and http loads the configuration file using these protocols (classpath is default). ref will lookup the configuration file in the registry. bean will call a method on a bean to be used as the configuration. For bean you can specify the method name after dot, eg bean:myBean.myMethod -
isLazyCreateEngine
public boolean isLazyCreateEngine() -
setLazyCreateEngine
public void setLazyCreateEngine(boolean lazyCreateEngine) This option allows creating 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
- Specified by:
createProducerin interfaceorg.apache.camel.Endpoint- Throws:
Exception
-
addConsumer
-
removeConsumer
-
addProducer
protected void addProducer() -
removeProducer
protected void removeProducer() -
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
Initializing and starts the engine if it wasn't initialized so far.- Throws:
Exception
-
getEngine
-
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-