com.cometway.ak
Class AK

java.lang.Object
  extended by com.cometway.ak.AK

public class AK
extends java.lang.Object

This class is contains the public static void main() method for starting the Comet Way Agent Kernel from a command line or other Java application launching utility. It expects a set of command line parameters as defined in the description of the main method.


Field Summary
static AgentKernelInterface instance
          Deprecated. Use getAgentKernel and setAgentKernel methods instead.
static java.lang.String PRODUCT_NAME
          This is the proper name of the Agent Kernel
static java.lang.String VERSION_INFO
          This is the proper name and version of the Agent Kernel.
static java.lang.String VERSION_STR
          This is the version of the Agent Kernel
 
Constructor Summary
protected AK()
          There is no public constructor for this class.
 
Method Summary
static AgentKernelInterface getAgentKernel()
          Returns the Agent Kernel instance referenced by AK static methods.
static ClassFactoryInterface getDefaultClassFactory()
          Returns the default ClassFactoryInterface instance used to create new class instances.
static ReporterInterface getDefaultReporter()
          Returns the default ReporterInterface instance that is assigned to new agents.
static ServiceManagerInterface getDefaultServiceManager()
          Returns the default ServiceManagerInterface instance that is assigned to new agents.
static java.lang.String getParam(java.lang.String[] args, java.lang.String sw)
          returns a String value of the parameger 'sw' given all the parameter 'args'
static boolean hasParam(java.lang.String[] args, java.lang.String sw)
          returns true if 'sw' is a param within 'args', the list of parameters
static void main(java.lang.String[] args)
          Called with command line parameters to bootstrap the agent kernel.
static void setAgentKernel(AgentKernelInterface newAgentKernel)
          Sets the Agent Kernel instance referenced by AK static methods.
static void setDefaultClassFactory(ClassFactoryInterface newFactory)
          Sets the default ClassFactoryInterface instance used to create new class instances.
static void setDefaultReporter(ReporterInterface newReporter)
          Sets the default ReporterInterface instance that is assigned to new agents.
static void setDefaultServiceManager(ServiceManagerInterface newServiceManager)
          Sets the default ServiceManagerInterface instance that is assigned to new agents.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PRODUCT_NAME

public static final java.lang.String PRODUCT_NAME
This is the proper name of the Agent Kernel

See Also:
Constant Field Values

VERSION_STR

public static final java.lang.String VERSION_STR
This is the version of the Agent Kernel

See Also:
Constant Field Values

VERSION_INFO

public static final java.lang.String VERSION_INFO
This is the proper name and version of the Agent Kernel.

See Also:
Constant Field Values

instance

public static AgentKernelInterface instance
Deprecated. Use getAgentKernel and setAgentKernel methods instead.
This is the instance of the active Agent Kernel.

Constructor Detail

AK

protected AK()
There is no public constructor for this class.

Method Detail

getDefaultClassFactory

public static ClassFactoryInterface getDefaultClassFactory()
Returns the default ClassFactoryInterface instance used to create new class instances.


setDefaultClassFactory

public static void setDefaultClassFactory(ClassFactoryInterface newFactory)
Sets the default ClassFactoryInterface instance used to create new class instances.


getDefaultReporter

public static ReporterInterface getDefaultReporter()
Returns the default ReporterInterface instance that is assigned to new agents.


setDefaultReporter

public static void setDefaultReporter(ReporterInterface newReporter)
Sets the default ReporterInterface instance that is assigned to new agents.


getAgentKernel

public static AgentKernelInterface getAgentKernel()
Returns the Agent Kernel instance referenced by AK static methods.


setAgentKernel

public static void setAgentKernel(AgentKernelInterface newAgentKernel)
Sets the Agent Kernel instance referenced by AK static methods.


getDefaultServiceManager

public static ServiceManagerInterface getDefaultServiceManager()
Returns the default ServiceManagerInterface instance that is assigned to new agents.


setDefaultServiceManager

public static void setDefaultServiceManager(ServiceManagerInterface newServiceManager)
Sets the default ServiceManagerInterface instance that is assigned to new agents.


main

public static void main(java.lang.String[] args)
Called with command line parameters to bootstrap the agent kernel.

ak [-reporter [<classname>|null]] [-hide_println] [-hide_debug] [-hide_warning] [-startup_agent <classname>] [-startup_dir <dir>] [<.agent file>|<classname>] ...


getParam

public static java.lang.String getParam(java.lang.String[] args,
                                        java.lang.String sw)
returns a String value of the parameger 'sw' given all the parameter 'args'


hasParam

public static boolean hasParam(java.lang.String[] args,
                               java.lang.String sw)
returns true if 'sw' is a param within 'args', the list of parameters