Novell exteNd Messaging Platform 5.2

com.sssw.jbroker.api.activation
Class ServerDesc

java.lang.Object
  extended bycom.sssw.jbroker.api.activation.ServerDesc
All Implemented Interfaces:
Serializable

public class ServerDesc
extends Object
implements Serializable

The server deployment descriptor describes the various parameters needed by the ORB to start a server within a Java VM.

See Also:
Serialized Form

Constructor Summary
ServerDesc(Properties properties)
          Construct a Server Deployment Descriptor from the given properties.
ServerDesc(String mainClass, String alias, String[] classPath, String[] args, String[] vmFlags, String logDir)
          Construct a Server Deployment Descriptor from the individual values.
 
Method Summary
 String getAlias()
          Get the unique name for this Server.
 String[] getArgs()
          Get the arguments that are passed to the activated server.
 String getClassName()
          Get the fully qualified name of the Server Main Class.
 String[] getClassPath()
          Get the classpath for the Server.
 String getLogDir()
          Get the Server Logs directory.
 Properties getProperties()
          Get the Server Deployment Descriptor as a Properties object.
 String[] getVmFlags()
          Get the options/properties that are passed to the activated Java VM that runs the server.
 void print(PrintWriter writer)
          Write out the Server Deployment Descriptor.
 void setAlias(String alias)
          Set the unique name for this Server.
 void setArgs(String[] args)
          Set the arguments to be passed to the activated server.
 void setClassName(String main)
          Set the fully qualified name of the Server Main Class.
 void setClassPath(String[] cp)
          Set the classpath for the Server.
 void setLogDir(String logDir)
          Set the directory where the System.out and System.err streams are redirected to.
 void setVmFlags(String[] flags)
          Set the options/properties to pass to the activated Java VM that runs the server.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerDesc

public ServerDesc(Properties properties)
           throws ActivationException
Construct a Server Deployment Descriptor from the given properties. The table below describes the properties that are recognized.

Property Name
Property Description
server.main
This property specifies a fully qualified name of the class with a public static void main(Sting[]) method. This method is given control by the ORB when the server is activated. [REQUIRED]
server.alias
This property specifies a user choosen name that is unique within the Activation System. This name can later be used on several activation utilities and as parameter to the ORB. [REQUIRED]
server.classpath
 This property specifies a space separated list of classpath elements that are needed by the server to run. A full classpath is constructed by jorbd by prefixing the path with JBroker and JDK classes.
server.args
This property specifies a space separated list of arguments to be passed on the command line to the server. The main method of the server will get the argument list as parameters when the server starts up.
server.vmflags This property specifies a space separated list of flags to be passed to the Java VM that is started by the server. You can specify flags like -D, -ms, -mx, etc.
server.logdir
The ORB automatically redirects the System.out and System.err streams of the ORB started servers to files under the db/logs directory. This directory can be over-ridden by specifying a fully qualified path to a directory of your choice. 


ServerDesc

public ServerDesc(String mainClass,
                  String alias,
                  String[] classPath,
                  String[] args,
                  String[] vmFlags,
                  String logDir)
           throws ActivationException
Construct a Server Deployment Descriptor from the individual values.

Parameters:
mainClass - value for server.main
alias - value for server.alias
classPath - value for server.classpath
args - value for server.args
vmFlags - value for server.vmflags
logDir - value for server.logdir
See Also:
ServerDesc(Properties)
Method Detail

setClassName

public final void setClassName(String main)
Set the fully qualified name of the Server Main Class. This class should have a public static void main(Sting[]) method. This method is given control by the ORB when the server is activated.

For the ServerDesc to be valid it should have the class name set.

Parameters:
main - fully qualified class name

getClassName

public final String getClassName()
Get the fully qualified name of the Server Main Class.

Returns:
fully qualified class name

setAlias

public final void setAlias(String alias)
Set the unique name for this Server. This name can later be used on several activation utilities and as parameter to the ORB.

For the ServerDesc to be valid it should have the alias specified.

Parameters:
alias - unique name of the server

getAlias

public final String getAlias()
Get the unique name for this Server.

Returns:
unique name of the server

setClassPath

public final void setClassPath(String[] cp)
Set the classpath for the Server. It is not necessary to add the JBroker and JDK classpaths here. At server activation, the full classpath is constructed by the ORB by prefixing the given path with the JBroker and the JDK classes.

Parameters:
cp - server class path

getClassPath

public final String[] getClassPath()
Get the classpath for the Server.

Returns:
server class path

setArgs

public final void setArgs(String[] args)
Set the arguments to be passed to the activated server. The main method of the server will get the argument list as parameters when the server starts up.

Parameters:
args - arguments to the server main

getArgs

public final String[] getArgs()
Get the arguments that are passed to the activated server.

Returns:
arguments to the server main

setVmFlags

public final void setVmFlags(String[] flags)
Set the options/properties to pass to the activated Java VM that runs the server. You can specify flags like -D, -ms, -mx, etc.

Parameters:
flags - Java VM options/properties

getVmFlags

public final String[] getVmFlags()
Get the options/properties that are passed to the activated Java VM that runs the server.

Returns:
Java VM options/properties

setLogDir

public final void setLogDir(String logDir)
Set the directory where the System.out and System.err streams are redirected to. The file names are set to /.out and /.err respectively.

Parameters:
logDir - server log directory

getLogDir

public final String getLogDir()
Get the Server Logs directory.

Returns:
server log directory

getProperties

public final Properties getProperties()
Get the Server Deployment Descriptor as a Properties object.

Returns:
the server descriptor properties
See Also:
ServerDesc(Properties)

print

public final void print(PrintWriter writer)
Write out the Server Deployment Descriptor.

Parameters:
writer - writer to write the ServerDesc to

Novell exteNd Messaging Platform 5.2

exteNd is a registered trademark of Novell, Inc.
Copyright 1998-2004 Novell, Inc. All Rights Reserved.