DRCL JavaSim API

drcl.intserv
Class SchedulerConfig

java.lang.Object
  |
  +--drcl.comp.Contract
        |
        +--drcl.intserv.SchedulerConfig

public class SchedulerConfig
extends Contract

The SchedulerConfiguration contract. This contract defines three services at the reactor:

AdspecProcessing
The initiator sends a SpecAd and in response, the reactor sends back the upated adspec.
FlowspecAddition
The initiator sends a message that consists of:
  1. an integer of value 0 (the "add" command);
  2. the set of ToS values (long[]) associated with the flowspec, could be null;
  3. the set of ToS mask values (long[]) associated with the ToS values, could be null, and
  4. the flowspec (SpecFlow).
In response, the reactor returns null and the handle number is set in the flowspec if the flowspec is sucessfully installed, or returns another flowspec that reflects the availability of the resources if failed.
FlowspecModification
The initiator sends a message that has the same format as a FlowspecAddition except that the first field is an integer of value 1 (the "modify" command). The second and the third fields are not used. The response is the same as that of FlowspecAddition. In case that the request is failed, the previous installation is intact.
FlowspecRemoval
The initiator sends a message that consists of:
  1. an integer of value 2 (the "remove" command);
  2. the handle of the flowspec to be removed
In response, the reactor removes the flowspec and returns the removed flowspec.
FlowspecQuery
The initiator sends a message that has the same format as a FlowspecRemoval except that the first field is an integer of value 3 (the "query" command). Use negative handle to query all the installed flowspecs. In response, the reactor returns the queried flowspec(s).

Version:
1.0, 6/2001
Author:
Hung-ying Tyan

Inner Class Summary
static class SchedulerConfig.Message
           
 
Field Summary
static int ADD
           
static SchedulerConfig INSTANCE
           
static int MODIFY
           
static int QUERY
           
static int REMOVE
           
 
Fields inherited from class drcl.comp.Contract
Role_INITIATOR, Role_PEER, Role_REACTOR
 
Constructor Summary
SchedulerConfig()
           
SchedulerConfig(int role_)
           
 
Method Summary
static SpecFlow add(long[] tos_, long[] tosmask_, SpecFlow fspec_, Port out_)
           
 java.lang.Object getContractContent()
          Returns the content of this contract (format?).
 java.lang.String getName()
           
static SpecFlow modify(SpecFlow fspec_, Port out_)
           
static SpecFlow query(int handle_, Port out_)
           
static SpecFlow[] queryAll(Port out_)
           
static SpecFlow remove(int handle_, Port out_)
           
 
Methods inherited from class drcl.comp.Contract
getRole, match, setRole
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final SchedulerConfig INSTANCE

ADD

public static final int ADD

MODIFY

public static final int MODIFY

REMOVE

public static final int REMOVE

QUERY

public static final int QUERY
Constructor Detail

SchedulerConfig

public SchedulerConfig()

SchedulerConfig

public SchedulerConfig(int role_)
Method Detail

getName

public java.lang.String getName()
Overrides:
getName in class Contract

getContractContent

public java.lang.Object getContractContent()
Description copied from class: Contract
Returns the content of this contract (format?).
Overrides:
getContractContent in class Contract

add

public static SpecFlow add(long[] tos_,
                           long[] tosmask_,
                           SpecFlow fspec_,
                           Port out_)

modify

public static SpecFlow modify(SpecFlow fspec_,
                              Port out_)

remove

public static SpecFlow remove(int handle_,
                              Port out_)

query

public static SpecFlow query(int handle_,
                             Port out_)

queryAll

public static SpecFlow[] queryAll(Port out_)

DRCL JavaSim API

Copyright © 2001 - DRCL, OSU     ~ Back to JavaSim Home ~