com.dynalivery.saffron.client
Class ServerType

java.lang.Object
  extended bycom.dynalivery.saffron.client.ServerType

public class ServerType
extends java.lang.Object

This class defines the allowable Saffron server types.


Field Summary
static int CORBA
          a CORBA Saffron server
static int EJB
          an EJB Saffron server
static int EMBEDDED
          an embedded (in-process) Saffron server
protected static java.lang.String[] typeStrings
           
 
Constructor Summary
ServerType()
           
 
Method Summary
static int getTypeForString(java.lang.String serverTypeString)
          Returns the integer server type for the specified String
static java.lang.String getTypeString(int serverType)
          Returns a descriptive String for the specified server type
static void validate(int serverType)
          Validates the specified integer server type
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMBEDDED

public static final int EMBEDDED
an embedded (in-process) Saffron server

See Also:
Constant Field Values

CORBA

public static final int CORBA
a CORBA Saffron server

See Also:
Constant Field Values

EJB

public static final int EJB
an EJB Saffron server

See Also:
Constant Field Values

typeStrings

protected static final java.lang.String[] typeStrings
Constructor Detail

ServerType

public ServerType()
Method Detail

validate

public static void validate(int serverType)
                     throws InvalidParameterException
Validates the specified integer server type

Parameters:
serverType - the integer server type (e.g. ServerType.EMBEDDED)
Throws:
InvalidParameterException - thrown if server type is invalid

getTypeForString

public static int getTypeForString(java.lang.String serverTypeString)
                            throws InvalidParameterException
Returns the integer server type for the specified String

Parameters:
serverTypeString - a server type string, case is ignored (e.g. EMBEDDED, embedded and Embedded are all acceptable)
Returns:
the integer server type for the specified String
Throws:
InvalidParameterException - thrown if no server type matches specified string

getTypeString

public static java.lang.String getTypeString(int serverType)
                                      throws InvalidParameterException
Returns a descriptive String for the specified server type

Parameters:
serverType - an integer server type (e.g. ServerType.EMBEDDED)
Returns:
a descriptive String for the specified server type
Throws:
InvalidParameterException - thrown if server type is invalid