org.marketcetera.ors.brokers
Class Selector

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

public class Selector
extends Object

The in-memory representation of the selector.

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

Constructor Summary
Selector(Brokers brokers, SpringSelector springSelector)
          Creates a new selector based on the given configuration.
 
Method Summary
 BrokerID chooseBroker(Order order)
          Returns the ID of the broker the receiver selects for the given order.
 BrokerID getDefaultBroker()
          Returns the receiver's default broker ID.
 List<SelectorEntry> getEntries()
          Returns the receiver's entries.
 SpringSelector getSpringSelector()
          Returns the receiver's configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Selector

public Selector(Brokers brokers,
                SpringSelector springSelector)
Creates a new selector based on the given configuration.

Parameters:
springSelector - The configuration.
Method Detail

getSpringSelector

public SpringSelector getSpringSelector()
Returns the receiver's configuration.

Returns:
The configuration.

getEntries

public List<SelectorEntry> getEntries()
Returns the receiver's entries.

Returns:
The entries. It may be null.

getDefaultBroker

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

Returns:
The ID. It may be null.

chooseBroker

public BrokerID chooseBroker(Order order)
Returns the ID of the broker the receiver selects for the given order.

Parameters:
order - The order.
Returns:
The ID of the selected broker, or null if the selector cannot make a selection.


Copyright © 2012. All Rights Reserved.