org.jgroups.service
Class ServiceRunner
java.lang.Object
org.jgroups.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.jgroups.service.ServiceRunner -res
where
res_name
is name of the resource describing service to
run in form acceptable by
java.util.ResourceBundle
class.
- Roman Rokytskyy (rrokytskyy@acm.org)
static void | main(String[] args) - Main entry to run this class.
|
static void | startService(ResourceBundle res) - Method to start service.
|
CLIENT_CHANNEL_STACK
public static final String CLIENT_CHANNEL_STACK
CLIENT_GROUP_NAME
public static final String CLIENT_GROUP_NAME
HELP_SWITCH
public static final String HELP_SWITCH
RESOURCE_SWITCH
public static final String RESOURCE_SWITCH
SERVICE_CHANNEL_STACK
public static final String SERVICE_CHANNEL_STACK
SERVICE_CLASS
public static final String SERVICE_CLASS
SERVICE_GROUP_NAME
public static final String SERVICE_GROUP_NAME
main
public static void main(String[] args)
throws Exception
Main entry to run this class.
startService
public static void startService(ResourceBundle res)
throws Exception
Method to start service. This method extracts parameters from
specified resource, creates instance of service and starts it.
res
- resource bundle containing information about resource.
Copyright B) 2001,2002 www.jgroups.com . All Rights Reserved.