org.cocome.tradingsystem.inventory.application
Class ApplicationFactory

java.lang.Object
  extended by org.cocome.tradingsystem.inventory.application.ApplicationFactory

public class ApplicationFactory
extends java.lang.Object

Factory to create an application component

Author:
Yannick Welsch

Constructor Summary
ApplicationFactory()
           
 
Method Summary
static CashDeskConnectorIf getCashDeskInstance(long storeid)
           
static ProductDispatcherIf getProductDispatcherInstance()
           
static ReportingIf getReportingInstance()
           
static StoreIf getStoreInstance(long storeid)
           
static void main(java.lang.String[] args)
          used by ant target to register store or reporting component at rmi registry - for store registration, call with "type name storeid" - for cashdesk registration, call with "type name storeid" - for reporting registration, call with "type name"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationFactory

public ApplicationFactory()
Method Detail

getReportingInstance

public static ReportingIf getReportingInstance()
Returns:
a new Reporting component instance

getStoreInstance

public static StoreIf getStoreInstance(long storeid)
Parameters:
storeid - the store to be affected
Returns:
a new Store component instance with StoreIf interface

getCashDeskInstance

public static CashDeskConnectorIf getCashDeskInstance(long storeid)
Parameters:
storeid - the store to be affected
Returns:
a new Store component instance with CashDeskConnectorIf interface

getProductDispatcherInstance

public static ProductDispatcherIf getProductDispatcherInstance()
Returns:
a new instance of the ProductDispatcher

main

public static void main(java.lang.String[] args)
                 throws java.rmi.RemoteException,
                        java.lang.InterruptedException,
                        javax.jms.JMSException,
                        javax.naming.NamingException
used by ant target to register store or reporting component at rmi registry - for store registration, call with "type name storeid" - for cashdesk registration, call with "type name storeid" - for reporting registration, call with "type name"

Parameters:
args - where arg[0] == 1 if store is to be registered or arg[0] == 0 if reporting is to be registered
Throws:
java.rmi.RemoteException
javax.naming.NamingException
javax.jms.JMSException
java.lang.InterruptedException