org.marketcetera.client.config
Class SpringConfig

java.lang.Object
  extended by org.marketcetera.client.config.SpringConfig
All Implemented Interfaces:
InitializingBean

public class SpringConfig
extends Object
implements InitializingBean

The application's Spring-based configuration. A global singleton instance of this class is created by Spring during the creation of the application's ApplicationContext, and it contains all end-user configuration of the application.

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

Constructor Summary
SpringConfig()
          Creates a new application configuration, which becomes the global singleton.
SpringConfig(ConnectionFactory incomingCF, ConnectionFactory outgoingCF, Collection<OrderModifier> inOrderModifiers)
          Creates a new application configuration with the given properties.
 
Method Summary
 void afterPropertiesSet()
           
 ConnectionFactory getIncomingConnectionFactory()
          Returns the receiver's connection factory for incoming connections.
 Collection<OrderModifier> getOrderModifiers()
          Get the orderModifiers value.
 ConnectionFactory getOutgoingConnectionFactory()
          Returns the receiver's connection factory for outgoing connections.
static SpringConfig getSingleton()
          Returns the global singleton configuration.
 void setIncomingConnectionFactory(ConnectionFactory incomingCF)
          Sets the receiver's connection factory for incoming connections to the given one.
 void setOrderModifiers(Collection<OrderModifier> inOrderModifiers)
          Sets the orderModifiers value.
 void setOutgoingConnectionFactory(ConnectionFactory outgoingCF)
          Sets the receiver's connection factory for outgoing connections to the given one.
static void setSingleton(SpringConfig singleton)
          Sets the global singleton configuration to the given one.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringConfig

public SpringConfig()
Creates a new application configuration, which becomes the global singleton.


SpringConfig

public SpringConfig(ConnectionFactory incomingCF,
                    ConnectionFactory outgoingCF,
                    Collection<OrderModifier> inOrderModifiers)
             throws I18NException
Creates a new application configuration with the given properties. The new configuration becomes the global singleton.

Parameters:
incomingCF - The connection factory for incoming connections.
outgoingCF - The connection factory for outgoing connections.
inOrderModifiers - a Collection<OrderModifier> value or null
Throws:
I18NException
Method Detail

setSingleton

public static void setSingleton(SpringConfig singleton)
Sets the global singleton configuration to the given one.

Parameters:
singleton - The configuration. It may be null.

getSingleton

public static SpringConfig getSingleton()
Returns the global singleton configuration.

Returns:
The configuration. It may be null.

setIncomingConnectionFactory

public void setIncomingConnectionFactory(ConnectionFactory incomingCF)
Sets the receiver's connection factory for incoming connections to the given one. A non-null value should be set during the receiver's initialization.

Parameters:
incomingCF - The factory.

getIncomingConnectionFactory

public ConnectionFactory getIncomingConnectionFactory()
Returns the receiver's connection factory for incoming connections.

Returns:
The factory.

setOutgoingConnectionFactory

public void setOutgoingConnectionFactory(ConnectionFactory outgoingCF)
Sets the receiver's connection factory for outgoing connections to the given one. A non-null value should be set during the receiver's initialization.

Parameters:
outgoingCF - The factory.

getOutgoingConnectionFactory

public ConnectionFactory getOutgoingConnectionFactory()
Returns the receiver's connection factory for outgoing connections.

Returns:
The factory.

getOrderModifiers

public Collection<OrderModifier> getOrderModifiers()
Get the orderModifiers value.

Returns:
a Collection<OrderModifier> value

setOrderModifiers

public void setOrderModifiers(Collection<OrderModifier> inOrderModifiers)
Sets the orderModifiers value.

Parameters:
a - Collection<OrderModifier> value

afterPropertiesSet

public void afterPropertiesSet()
                        throws I18NException
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
I18NException


Copyright © 2012. All Rights Reserved.