org.marketcetera.client
Class ClientModuleFactory

java.lang.Object
  extended by org.marketcetera.module.ModuleFactory
      extended by org.marketcetera.client.ClientModuleFactory
All Implemented Interfaces:
ClientModuleFactoryMXBean

public class ClientModuleFactory
extends ModuleFactory
implements ClientModuleFactoryMXBean

The provider / factory that creates Client Module instance.

The factory assumes that the Client is already initialized if the URL is not set. Otherwise if the URL is set and the Client is not initialized, the factory will initialize the Client before creating the module instance.

The factory has the following characteristics.

Provider URN:metc:server:system
Cardinality:Singleton
InstanceURN:metc:server:system:single
Auto-Instantiated:No
Auto-Started:Yes
Instantiation Arguments:None
Management InterfaceClientModuleFactoryMXBean
Module TypeClientModule

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

Field Summary
static ModuleURN INSTANCE_URN
           
 
Constructor Summary
ClientModuleFactory()
          Creates an instance.
 
Method Summary
 Module create(Object[] inParameters)
           
 String getHostname()
          The server hostname.
 String getIDPrefix()
          The string that should be prefixed to any orderIDs generated by the client based on IDs issued by the server.
 int getPort()
          The port number of the server.
 String getURL()
          The Server URL to connect to.
 String getUsername()
          The username to use when connecting to the server.
 void setHostname(String inHostname)
          Sets the server host name.
 void setIDPrefix(String inIDPrefix)
          Sets the string that should be prefixed to any orderIDs generated by the client based on IDs issued by the server.
 void setPassword(String inPassword)
          Sets the password to use when connecting to the server.
 void setPort(int inPort)
          Sets the server port number.
 void setURL(String inURL)
          Sets the Server URL to connect to.
 void setUsername(String inUsername)
          Sets the user name to use when connecting to the server.
 
Methods inherited from class org.marketcetera.module.ModuleFactory
getParameterTypes, getProviderDescription, getProviderURN, isAutoInstantiate, isMultipleInstances
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE_URN

public static final ModuleURN INSTANCE_URN
Constructor Detail

ClientModuleFactory

public ClientModuleFactory()
Creates an instance.

Method Detail

create

public Module create(Object[] inParameters)
              throws ModuleCreationException
Specified by:
create in class ModuleFactory
Throws:
ModuleCreationException

getURL

public String getURL()
Description copied from interface: ClientModuleFactoryMXBean
The Server URL to connect to.

Specified by:
getURL in interface ClientModuleFactoryMXBean
Returns:
the Server URL

setURL

public void setURL(String inURL)
Description copied from interface: ClientModuleFactoryMXBean
Sets the Server URL to connect to.

Specified by:
setURL in interface ClientModuleFactoryMXBean
Parameters:
inURL - the Server URL

getUsername

public String getUsername()
Description copied from interface: ClientModuleFactoryMXBean
The username to use when connecting to the server.

Specified by:
getUsername in interface ClientModuleFactoryMXBean
Returns:
the username.

setUsername

public void setUsername(String inUsername)
Description copied from interface: ClientModuleFactoryMXBean
Sets the user name to use when connecting to the server.

Specified by:
setUsername in interface ClientModuleFactoryMXBean
Parameters:
inUsername - the username.

setPassword

public void setPassword(String inPassword)
Description copied from interface: ClientModuleFactoryMXBean
Sets the password to use when connecting to the server.

Specified by:
setPassword in interface ClientModuleFactoryMXBean
Parameters:
inPassword - the password.

getHostname

public String getHostname()
Description copied from interface: ClientModuleFactoryMXBean
The server hostname.

Specified by:
getHostname in interface ClientModuleFactoryMXBean
Returns:
the server hostname.

setHostname

public void setHostname(String inHostname)
Description copied from interface: ClientModuleFactoryMXBean
Sets the server host name.

Specified by:
setHostname in interface ClientModuleFactoryMXBean
Parameters:
inHostname - the server hostname.

getPort

public int getPort()
Description copied from interface: ClientModuleFactoryMXBean
The port number of the server.

Specified by:
getPort in interface ClientModuleFactoryMXBean
Returns:
the server port number.

setPort

public void setPort(int inPort)
Description copied from interface: ClientModuleFactoryMXBean
Sets the server port number.

Specified by:
setPort in interface ClientModuleFactoryMXBean
Parameters:
inPort - the server port number.

getIDPrefix

public String getIDPrefix()
Description copied from interface: ClientModuleFactoryMXBean
The string that should be prefixed to any orderIDs generated by the client based on IDs issued by the server.

Specified by:
getIDPrefix in interface ClientModuleFactoryMXBean
Returns:
the orderID prefix.

setIDPrefix

public void setIDPrefix(String inIDPrefix)
Description copied from interface: ClientModuleFactoryMXBean
Sets the string that should be prefixed to any orderIDs generated by the client based on IDs issued by the server.

Specified by:
setIDPrefix in interface ClientModuleFactoryMXBean
Parameters:
inIDPrefix - the orderID prefix.


Copyright © 2012. All Rights Reserved.