dk.brics.bisimulationGame.model
Class Protocol

java.lang.Object
  extended by dk.brics.bisimulationGame.model.Protocol

public class Protocol
extends java.lang.Object

Static information for remote method invocation.

Author:
Martin Mosegaard martinm@daimi.au.dk

Field Summary
static java.lang.String DELIM
          A delimiter used for encoding messages.
static java.lang.String EX_MESSAGE_UNBOUND
           
static java.lang.String GLOBAL_MODEL_NAME
          The registry name of the global model object.
static int MESSAGE_ATTACKER_CHOSE_SIDE
           
static int MESSAGE_ATTACKER_STEP
           
static int MESSAGE_DEFENDER_STEP
           
static java.lang.String MESSAGE_PASSER_NAME
          The registry name of the message passer object.
static int MESSAGE_RESET_GAME
           
static int PORT
          A fixed port on which to create a registry.
 
Constructor Summary
Protocol()
           
 
Method Summary
static java.util.Vector<java.lang.String> decode(int messageNumber, java.lang.String message)
          Decode a message and put relevant arguments in a vector.
static java.lang.String encode(java.util.Vector<java.lang.String> args)
          Encode a list of arguments into one string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORT

public static final int PORT
A fixed port on which to create a registry.

See Also:
Constant Field Values

GLOBAL_MODEL_NAME

public static final java.lang.String GLOBAL_MODEL_NAME
The registry name of the global model object.

See Also:
Constant Field Values

MESSAGE_PASSER_NAME

public static final java.lang.String MESSAGE_PASSER_NAME
The registry name of the message passer object.

See Also:
Constant Field Values

EX_MESSAGE_UNBOUND

public static final java.lang.String EX_MESSAGE_UNBOUND
See Also:
Constant Field Values

MESSAGE_ATTACKER_CHOSE_SIDE

public static final int MESSAGE_ATTACKER_CHOSE_SIDE
See Also:
Constant Field Values

MESSAGE_ATTACKER_STEP

public static final int MESSAGE_ATTACKER_STEP
See Also:
Constant Field Values

MESSAGE_DEFENDER_STEP

public static final int MESSAGE_DEFENDER_STEP
See Also:
Constant Field Values

MESSAGE_RESET_GAME

public static final int MESSAGE_RESET_GAME
See Also:
Constant Field Values

DELIM

public static final java.lang.String DELIM
A delimiter used for encoding messages.

See Also:
Constant Field Values
Constructor Detail

Protocol

public Protocol()
Method Detail

encode

public static java.lang.String encode(java.util.Vector<java.lang.String> args)
Encode a list of arguments into one string.

Parameters:
args - A vector of arguments
Returns:
The list of arguments as a string

decode

public static java.util.Vector<java.lang.String> decode(int messageNumber,
                                                        java.lang.String message)
Decode a message and put relevant arguments in a vector.

Parameters:
messageNumber - A constant field value
message - A string message
Returns:
A vector of arguments