public final class HandlerChain extends AbstractSessionMessageHandler
HandlerChain
provides the chain of responsibility pattern.Modifier and Type | Field and Description |
---|---|
protected CompositeMessageHandler |
compositeListener |
protected List<SessionMessageHandler> |
messageHandlers |
protected List<PostProcessMessageHandler> |
postProcessMessageHandlers |
protected List<PreProcessMessageHandler> |
preProcessMessageHandlers |
protected RawFIXUtil.RawTags |
rawTags |
log, logIsTraceEnabled
Constructor and Description |
---|
HandlerChain()
Creates the
HandlerChain with composite message handler. |
Modifier and Type | Method and Description |
---|---|
void |
addGlobalMessageHandler(AbstractGlobalMessageHandler globalMessageHandler)
Adds the global message handler.
|
void |
addGlobalPostProcessMessageHandler(AbstractGlobalPostProcessSessionMessageHandler globalMessageHandler)
Adds the global message handler.
|
void |
addGlobalPreProcessMessageHandler(PreProcessMessageHandler globalMessageHandler) |
void |
addInSessionMessageListener(FIXMessageListener listener)
Sets listener to receive session level incoming messages.
|
void |
addSessionMessageHandler(String msgType,
SessionMessageHandler messageHandler)
Adds the specific message handle.
|
void |
addUserGlobalMessageHandler(com.epam.fixengine.session.messagehandler.AbstractUserGlobalMessageHandler userMessageHandler) |
protected void |
finalize() |
boolean |
isNeedPreProcess() |
void |
onMessage(MsgBuf message) |
void |
onNewMessage(FIXFieldList message)
This method is invoked every time when FIX Engine receives
application message.
|
void |
onPostProcessMessage(MsgBuf message) |
void |
onSessionStateChange(SessionState sessionState) |
void |
setFIXSession(ExtendedFIXSession fixSession)
Sets the extended fix session.
|
void |
setUserListener(FIXSessionListener listener)
Sets the user message compositeListener.
|
getFIXSession, logErrorToSession, logWarnToSession
protected CompositeMessageHandler compositeListener
protected List<SessionMessageHandler> messageHandlers
protected List<PreProcessMessageHandler> preProcessMessageHandlers
protected List<PostProcessMessageHandler> postProcessMessageHandlers
protected RawFIXUtil.RawTags rawTags
public HandlerChain()
HandlerChain
with composite message handler.public void setFIXSession(ExtendedFIXSession fixSession)
SessionMessageHandler
setFIXSession
in interface SessionMessageHandler
setFIXSession
in class AbstractSessionMessageHandler
fixSession
- the extended fix sessionAbstractSessionMessageHandler.setFIXSession(com.epam.fixengine.session.ExtendedFIXSession)
public void addSessionMessageHandler(String msgType, SessionMessageHandler messageHandler)
msgType
- the message typemessageHandler
- - the message handlerpublic void addGlobalMessageHandler(AbstractGlobalMessageHandler globalMessageHandler)
globalMessageHandler
- the global message handlerpublic void addUserGlobalMessageHandler(com.epam.fixengine.session.messagehandler.AbstractUserGlobalMessageHandler userMessageHandler)
public void addGlobalPostProcessMessageHandler(AbstractGlobalPostProcessSessionMessageHandler globalMessageHandler)
globalMessageHandler
- the global message handlerpublic void addGlobalPreProcessMessageHandler(PreProcessMessageHandler globalMessageHandler)
public void onNewMessage(FIXFieldList message)
FIXMessageListener
message
- the incoming messageFIXMessageListener.onNewMessage(com.epam.fix.message.FIXFieldList)
protected void finalize() throws Throwable
public void onMessage(MsgBuf message)
public void onPostProcessMessage(MsgBuf message)
public void onSessionStateChange(SessionState sessionState)
public void setUserListener(FIXSessionListener listener)
listener
- the session compositeListenerpublic void addInSessionMessageListener(FIXMessageListener listener)
listener
- the user listenerpublic boolean isNeedPreProcess()
Copyright © 2000–2022 EPAM Systems. All rights reserved.