com.epam.admintool.commands
Class Command

java.lang.Object
  extended by com.epam.admintool.commands.Command
Direct Known Subclasses:
ChangeSeqNum, CreateAcceptor, CreateInitiator, DefaultCommand, Delete, DeleteAll, GeneralSessionsStat, Heartbeat, Help, ProceedStat, ReceivedStat, ResetSeqNum, SendMessage, SentStat, SessionParams, SessionsList, SessionsSnapshot, SessionStat, SessionStatus, StopSession, TestRequest, ToBackup, ToPrimary

public abstract class Command
extends Object

Common interface for all command of Administrative tool.


Field Summary
protected  FIXSession adminFixSession
           
protected  com.epam.fixengine.manager.ConfiguredSessionRegister configuredSessionRegister
           
protected  Log log
           
protected  com.epam.fixicc.message.Request request
           
protected  com.epam.fixicc.message.ResponseData response
           
protected  String xmlContent
           
 
Constructor Summary
Command()
           
 
Method Summary
abstract  void execute()
          Execute command.
 FIXSession getAdminFixSession()
          getter for admin fix session.
protected  SessionParameters getConfiguredSession(String sessionID)
          Gets the fix session.
protected  SessionParameters getConfiguredSession(String senderCompID, String targetCompID, String qualifier)
          Gets the configured fix session.
protected  List<SessionParameters> getConfiguredSessionParameters()
          Gets the configured fix session list.
 com.epam.fixengine.manager.ConfiguredSessionRegister getConfiguredSessionRegister()
           
protected  ExtendedFIXSession getFIXSession(String sessionID)
          Gets the fix session.
protected  ExtendedFIXSession getFIXSession(String sender, String target, String qualifier)
          Gets the fix session.
protected  List<ExtendedFIXSession> getFIXSessions()
          Gets fix session list.
 com.epam.fixicc.message.Request getRequest()
          Getter for request.
 Long getRequestID()
          Gets request id from request.
 void sendError(String problem)
          Send error.
protected  void sendInvalidArgument(String problem)
          Send invalid argument.
protected  void sendReject(String problem)
          Send reject.
protected  void sendResponse(com.epam.fixicc.message.Response response)
          Send response.
protected  void sendResponse(String problem, String errorCode)
          Send response.
 void sendResponseSuccess(com.epam.fixicc.message.Response response)
          Send response.
protected  void sendUnknownSession(String id)
          Send error with unknown session.
protected  void sendUnknownSession(String sender, String target)
          Deprecated. 
 void setAdminFixSession(FIXSession adminFixSession)
          Setter for admin session.
 void setConfiguredSessionRegister(com.epam.fixengine.manager.ConfiguredSessionRegister configuredSessionRegister)
           
 void setRequest(com.epam.fixicc.message.Request request)
          Setter for request.
 void setXmlContent(String xmlContent)
          Setter for xmlContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final Log log

request

protected com.epam.fixicc.message.Request request

response

protected com.epam.fixicc.message.ResponseData response

xmlContent

protected String xmlContent

adminFixSession

protected FIXSession adminFixSession

configuredSessionRegister

protected com.epam.fixengine.manager.ConfiguredSessionRegister configuredSessionRegister
Constructor Detail

Command

public Command()
Method Detail

getRequest

public com.epam.fixicc.message.Request getRequest()
Getter for request.


setRequest

public void setRequest(com.epam.fixicc.message.Request request)
Setter for request.

Parameters:
request - the request

getRequestID

public Long getRequestID()
Gets request id from request.

if request not set returns null


setAdminFixSession

public void setAdminFixSession(FIXSession adminFixSession)
Setter for admin session.

Parameters:
adminFixSession - the admin session

getAdminFixSession

public FIXSession getAdminFixSession()
getter for admin fix session.


setConfiguredSessionRegister

public void setConfiguredSessionRegister(com.epam.fixengine.manager.ConfiguredSessionRegister configuredSessionRegister)

getConfiguredSessionRegister

public com.epam.fixengine.manager.ConfiguredSessionRegister getConfiguredSessionRegister()

execute

public abstract void execute()
Execute command.


sendResponse

protected void sendResponse(com.epam.fixicc.message.Response response)
Send response.

Parameters:
response -

sendResponseSuccess

public void sendResponseSuccess(com.epam.fixicc.message.Response response)
Send response.

Parameters:
response -

sendResponse

protected void sendResponse(String problem,
                            String errorCode)
Send response.

Parameters:
problem -
errorCode -

sendReject

protected void sendReject(String problem)
Send reject.

Parameters:
problem -

sendError

public void sendError(String problem)
Send error.

Parameters:
problem -

sendInvalidArgument

protected void sendInvalidArgument(String problem)
Send invalid argument.

Parameters:
problem -

sendUnknownSession

@Deprecated
protected void sendUnknownSession(String sender,
                                             String target)
Deprecated. 

Send error with unknown session.


sendUnknownSession

protected void sendUnknownSession(String id)
Send error with unknown session.


setXmlContent

public void setXmlContent(String xmlContent)
Setter for xmlContent


getFIXSession

protected ExtendedFIXSession getFIXSession(String sender,
                                           String target,
                                           String qualifier)
Gets the fix session.

Parameters:
sender - - sender
target - - target
qualifier - - qualifier

getFIXSession

protected ExtendedFIXSession getFIXSession(String sessionID)
Gets the fix session.

Parameters:
sessionID - - sessionID

getConfiguredSession

protected SessionParameters getConfiguredSession(String senderCompID,
                                                 String targetCompID,
                                                 String qualifier)
Gets the configured fix session.

Parameters:
senderCompID - - sender
targetCompID - - target
qualifier - - qualifier

getConfiguredSession

protected SessionParameters getConfiguredSession(String sessionID)
Gets the fix session.

Parameters:
sessionID - - sessionID

getFIXSessions

protected List<ExtendedFIXSession> getFIXSessions()
Gets fix session list.


getConfiguredSessionParameters

protected List<SessionParameters> getConfiguredSessionParameters()
Gets the configured fix session list.



Copyright © 2000-2014 EPAM Systems. All Rights Reserved.