org.marketcetera.ors.brokers
Class Broker

java.lang.Object
  extended by org.marketcetera.ors.brokers.Broker

public class Broker
extends Object

The in-memory representation of a single broker.

Since:
1.0.0
Version:
$Id: Broker.java 16154 2012-07-14 16:34:05Z colin $
Author:
tlerios@marketcetera.com

Constructor Summary
Broker(SpringBroker springBroker, ReportHistoryServices historyServices)
          Creates a new broker based on the given configuration.
 
Method Summary
 BrokerID getBrokerID()
          Returns the receiver's broker ID.
 DataDictionary getDataDictionary()
          Returns the receiver's QuickFIX/J data dictionary.
 FIXDataDictionary getFIXDataDictionary()
          Returns the receiver's FIX data dictionary.
 FIXMessageAugmentor getFIXMessageAugmentor()
          Returns the receiver's FIX message augmentor.
 FIXMessageFactory getFIXMessageFactory()
          Returns the receiver's FIX message factory.
 FIXVersion getFIXVersion()
          Returns the receiver's FIX version.
 boolean getLoggedOn()
          Returns the receiver's logon flag.
 MessageModifierManager getModifiers()
          Returns the receiver's message modifier manager.
 String getName()
          Returns the receiver's name.
 MessageModifierManager getPreSendModifiers()
          Returns the receiver's pre-sending message modifier manager.
 MessageModifierManager getResponseModifiers()
          Returns the receiver's response message modifier manager.
 MessageRouteManager getRoutes()
          Returns the receiver's route manager.
 Session getSession()
          Returns the receiver's QuickFIX/J session.
 SessionID getSessionID()
          Returns the receiver's QuickFIX/J session ID.
 SpringBroker getSpringBroker()
          Returns the receiver's configuration.
 BrokerStatus getStatus()
          Returns the receiver's status.
 void logMessage(Message msg)
          Logs the given message, analyzed using the receiver's data dictionary, at the debugging level.
 void setLoggedOn(boolean loggedOn)
          Sets the receiver's logon flag to the given value.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Broker

public Broker(SpringBroker springBroker,
              ReportHistoryServices historyServices)
Creates a new broker based on the given configuration. Its message modifiers are configured to rely on the given report history services provider for persistence operations.

Parameters:
springBroker - The configuration.
historyServices - The report history services provider.
Method Detail

getSpringBroker

public SpringBroker getSpringBroker()
Returns the receiver's configuration.

Returns:
The configuration.

getStatus

public BrokerStatus getStatus()
Returns the receiver's status.

Returns:
The status.

getName

public String getName()
Returns the receiver's name.

Returns:
The name.

getBrokerID

public BrokerID getBrokerID()
Returns the receiver's broker ID.

Returns:
The ID.

getSessionID

public SessionID getSessionID()
Returns the receiver's QuickFIX/J session ID.

Returns:
The ID.

getSession

public Session getSession()
Returns the receiver's QuickFIX/J session.

Returns:
The session.

getDataDictionary

public DataDictionary getDataDictionary()
Returns the receiver's QuickFIX/J data dictionary.

Returns:
The dictionary.

getModifiers

public MessageModifierManager getModifiers()
Returns the receiver's message modifier manager.

Returns:
The manager. It may be null.

getRoutes

public MessageRouteManager getRoutes()
Returns the receiver's route manager.

Returns:
The manager. It may be null.

getPreSendModifiers

public MessageModifierManager getPreSendModifiers()
Returns the receiver's pre-sending message modifier manager.

Returns:
The manager. It may be null.

getResponseModifiers

public MessageModifierManager getResponseModifiers()
Returns the receiver's response message modifier manager.

Returns:
The manager. It may be null.

getFIXVersion

public FIXVersion getFIXVersion()
Returns the receiver's FIX version.

Returns:
The version.

getFIXMessageFactory

public FIXMessageFactory getFIXMessageFactory()
Returns the receiver's FIX message factory.

Returns:
The factory.

getFIXDataDictionary

public FIXDataDictionary getFIXDataDictionary()
Returns the receiver's FIX data dictionary.

Returns:
The dictionary.

getFIXMessageAugmentor

public FIXMessageAugmentor getFIXMessageAugmentor()
Returns the receiver's FIX message augmentor.

Returns:
The augmentor.

setLoggedOn

public void setLoggedOn(boolean loggedOn)
Sets the receiver's logon flag to the given value. This method is synchronized to ensure that all threads will see the most up-to-date value for the flag.

Parameters:
loggedOn - The flag.

getLoggedOn

public boolean getLoggedOn()
Returns the receiver's logon flag. This method is synchronized to ensure that all threads will see the most up-to-date value for the flag.

Returns:
The flag.

logMessage

public void logMessage(Message msg)
Logs the given message, analyzed using the receiver's data dictionary, at the debugging level.

Parameters:
msg - The message.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2012. All Rights Reserved.