com.epam.admintool.commands
Class Command

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

public abstract class Command
extends Object

Common interface for all command of Administrative tool.


Field Summary
protected  FIXSession adminFixSession
           
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  ExtendedFIXSession getFIXSession(String sender, String target)
          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 sender, String target)
          Send error with unknown session.
 void setAdminFixSession(FIXSession adminFixSession)
          Setter for admin session.
 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
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.


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

protected void sendUnknownSession(String sender,
                                  String target)
Send error with unknown session.


setXmlContent

public void setXmlContent(String xmlContent)
Setter for xmlContent


getFIXSession

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

Parameters:
sender - - sender
target - - target

getFIXSessions

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



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