All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JavaGroups.JavaStack.Configurator

java.lang.Object
   |
   +----JavaGroups.JavaStack.Configurator

public class Configurator
extends Object
The task if this class is to setup and configure the protocol stack. A string describing the desired setup, which is both the layering and the configuration of each layer, is given to the configurator which creates and configures the protocol stack and returns a reference to the top layer (Protocol).

Future functionality will include the capability to dynamically modify the layering of the protocol stack and the properties of each layer.


Constructor Index

 o Configurator()

Method Index

 o FindProtocol(Protocol, String)
 o main(String[])
 o SetupProtocolStack(String, ProtocolStack)
The configuration string has a number of entries, separated by a ':' (semi).
 o StartProtocolStack(Protocol)
 o StopProtocolStack(Protocol)

Constructors

 o Configurator
 public Configurator()

Methods

 o SetupProtocolStack
 public Protocol SetupProtocolStack(String configuration,
                                    ProtocolStack st) throws Exception
The configuration string has a number of entries, separated by a ':' (semi). Each entry consists of the name of the protocol, followed by an optional configuration of that protocol. The configuration is enclosed in parentheses, and contains entries which are name/value pairs connected with an assignment sign (=) and separated by a semicolon.
UDP(in_port=5555;out_port=4445):FRAG(frag_size=1024)

The first entry defines the bottommost layer, the string is parsed left to right and the protocol stack constructed bottom up. Example: the string "UDP(in_port=5555):FRAG(frag_size=32000):DEBUG" results is the following stack:

   -----------------------
  | DEBUG                 |
  |-----------------------|
  | FRAG frag_size=32000  |
  |-----------------------|
  | UDP in_port=32000     |
   -----------------------
 

 o StartProtocolStack
 public void StartProtocolStack(Protocol bottom_prot)
 o StopProtocolStack
 public void StopProtocolStack(Protocol start_prot)
 o FindProtocol
 public Protocol FindProtocol(Protocol prot_stack,
                              String name)
 o main
 public static void main(String args[])

All Packages  Class Hierarchy  This Package  Previous  Next  Index