org.javagroups.service
Class ServiceRunner
java.lang.Object
|
+--org.javagroups.service.ServiceRunner
- public class ServiceRunner
- extends java.lang.Object
ServiceRunner
is utility class that runs services in standalone
mode. Each service is described with resource file containing following
properties:
serviceClass
- class name of service to run. Each service
must define public constructor that takes two parameters, instances of
Channel
class;
serviceChannel
- string description of protocol stack for
inter-service communication channel;
serviceGroup
- group name of inter-service communication
channel;
clientChannel
- protocol stack for client communication
channel;
clientGroup
- group name of client communication channel.
Class can be started from command line using:
java org.javagroups.service.ServiceRunner -res
where res_name
is name of the resource describing service to
run in form acceptable by ResourceBundle
class.
- Author:
- Roman Rokytskyy (rrokytskyy@acm.org)
Method Summary |
static void |
main(java.lang.String[] args)
Main entry to run this class. |
static void |
startService(java.util.ResourceBundle res)
Method to start service. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SERVICE_CLASS
public static final java.lang.String SERVICE_CLASS
SERVICE_CHANNEL_STACK
public static final java.lang.String SERVICE_CHANNEL_STACK
SERVICE_GROUP_NAME
public static final java.lang.String SERVICE_GROUP_NAME
CLIENT_CHANNEL_STACK
public static final java.lang.String CLIENT_CHANNEL_STACK
CLIENT_GROUP_NAME
public static final java.lang.String CLIENT_GROUP_NAME
HELP_SWITCH
public static final java.lang.String HELP_SWITCH
RESOURCE_SWITCH
public static final java.lang.String RESOURCE_SWITCH
ServiceRunner
public ServiceRunner()
startService
public static void startService(java.util.ResourceBundle res)
throws java.lang.Exception
- Method to start service. This method extracts parameters from
specified resource, creates instance of service and starts it.
- Parameters:
res
- resource bundle containing information about resource.
main
public static void main(java.lang.String[] args)
throws java.lang.Exception
- Main entry to run this class.
Copyright © 2001,2002 www.javagroups.com . All Rights Reserved.