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 String
static final String
static final String
static final String
Fields 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 void
addConsumer
(QuickfixjConsumer consumer) protected void
org.apache.camel.Consumer
createConsumer
(org.apache.camel.Processor processor) org.apache.camel.Producer
protected void
doStop()
void
Initializing and starts the engine if it wasn't initialized so far.quickfix.SessionID
getSID()
boolean
boolean
void
onEvent
(QuickfixjEventCategory eventCategory, quickfix.SessionID sessionID, quickfix.Message message) protected void
removeConsumer
(QuickfixjConsumer consumer) protected void
void
setConfigurationName
(String configurationName) Path to the quickfix configuration file.void
setLazyCreateEngine
(boolean lazyCreateEngine) This option allows creating QuickFIX/J engine on demand.void
setSessionID
(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, toString
Methods 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, suspend
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.camel.ComponentAware
getComponent
Methods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isSingletonProducer
Methods inherited from interface org.apache.camel.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods 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:
getComponent
in interfaceorg.apache.camel.ComponentAware
- Overrides:
getComponent
in 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:
createConsumer
in interfaceorg.apache.camel.Endpoint
- Throws:
Exception
-
createProducer
- Specified by:
createProducer
in 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:
onEvent
in interfaceQuickfixjEventListener
- Throws:
Exception
-
isMultipleConsumersSupported
public boolean isMultipleConsumersSupported()- Specified by:
isMultipleConsumersSupported
in interfaceorg.apache.camel.MultipleConsumersSupport
-
ensureInitialized
Initializing and starts the engine if it wasn't initialized so far.- Throws:
Exception
-
getEngine
-
doStop
- Overrides:
doStop
in classorg.apache.camel.support.service.BaseService
- Throws:
Exception
-