ittp
Class Parameters

java.lang.Object
  extended byjava.rmi.server.RemoteObject
      extended byjava.rmi.server.RemoteServer
          extended byjava.rmi.server.UnicastRemoteObject
              extended byittp.Parameters
All Implemented Interfaces:
java.rmi.Remote, RemoteControl, java.io.Serializable

public class Parameters
extends java.rmi.server.UnicastRemoteObject
implements RemoteControl

This class allows to define the different using's parameters of the server. It use RMI.

Author:
Frederic Bidon and Mathieu Texier
See Also:
Serialized Form

Field Summary
static int CONNECTION_MAX
          Number maximal of connection allowed
static int DEFAULT_CONNECTION
          default value for the number of connection
static int DEFAULT_TIMEOUT
          default value for the time out
static java.lang.String SHUT_DOWN
          shut down state
static java.lang.String START
          start state
static java.lang.String STOP
          stop state
static int TIMEOUT_MAX
          timout maximal allowed
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
Parameters()
          Constructor of this class
 
Method Summary
 java.lang.String getBaseDir()
           
 int getConnectionMax()
           
 int getNumberOfActiveConection()
           
 int getNumberOfConnect()
           
 int getNumberOfError()
           
 int getNumberOfOctet()
           
 int getNumberOfRequest()
           
 int getPort()
           
 java.lang.String getServerState()
           
 int getTimeOut()
           
 boolean isAllowedHeader(java.lang.String id)
           
 boolean isAllowedMethod(int request)
           
 void recordConnect()
           
 void recordError()
           
 void recordOctet(long octet)
           
 void recordRequest()
           
 void resetRecord()
           
 void setAllowedHeader(java.lang.String id, boolean value)
           
 void setAllowedMethod(int request, boolean value)
           
 void setBaseDir(java.lang.String baseDir)
           
 int setConnectionMax(int connectionMax)
           
 void setPort(int p)
           
 void setServerState(java.lang.String state)
           
 int setTimeOut(int timeOut)
           
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CONNECTION_MAX

public static final int CONNECTION_MAX
Number maximal of connection allowed

See Also:
Constant Field Values

TIMEOUT_MAX

public static final int TIMEOUT_MAX
timout maximal allowed

See Also:
Constant Field Values

DEFAULT_CONNECTION

public static final int DEFAULT_CONNECTION
default value for the number of connection

See Also:
Constant Field Values

DEFAULT_TIMEOUT

public static final int DEFAULT_TIMEOUT
default value for the time out

See Also:
Constant Field Values

START

public static final java.lang.String START
start state

See Also:
Constant Field Values

STOP

public static final java.lang.String STOP
stop state

See Also:
Constant Field Values

SHUT_DOWN

public static final java.lang.String SHUT_DOWN
shut down state

See Also:
Constant Field Values
Constructor Detail

Parameters

public Parameters()
           throws java.rmi.RemoteException
Constructor of this class

Throws:
java.rmi.RemoteException - when the ServerSocket cannot be opened.
Method Detail

isAllowedMethod

public boolean isAllowedMethod(int request)
                        throws java.rmi.RemoteException
Specified by:
isAllowedMethod in interface RemoteControl
Throws:
java.rmi.RemoteException

isAllowedHeader

public boolean isAllowedHeader(java.lang.String id)
                        throws java.rmi.RemoteException
Specified by:
isAllowedHeader in interface RemoteControl
Throws:
java.rmi.RemoteException

getServerState

public java.lang.String getServerState()
                                throws java.rmi.RemoteException
Specified by:
getServerState in interface RemoteControl
Throws:
java.rmi.RemoteException

setPort

public void setPort(int p)
             throws java.rmi.RemoteException
Specified by:
setPort in interface RemoteControl
Throws:
java.rmi.RemoteException

setBaseDir

public void setBaseDir(java.lang.String baseDir)
                throws java.rmi.RemoteException
Specified by:
setBaseDir in interface RemoteControl
Throws:
java.rmi.RemoteException

getPort

public int getPort()
            throws java.rmi.RemoteException
Specified by:
getPort in interface RemoteControl
Throws:
java.rmi.RemoteException

getBaseDir

public java.lang.String getBaseDir()
                            throws java.rmi.RemoteException
Specified by:
getBaseDir in interface RemoteControl
Throws:
java.rmi.RemoteException

getNumberOfRequest

public int getNumberOfRequest()
                       throws java.rmi.RemoteException
Specified by:
getNumberOfRequest in interface RemoteControl
Throws:
java.rmi.RemoteException

getNumberOfError

public int getNumberOfError()
                     throws java.rmi.RemoteException
Specified by:
getNumberOfError in interface RemoteControl
Throws:
java.rmi.RemoteException

getNumberOfOctet

public int getNumberOfOctet()
                     throws java.rmi.RemoteException
Specified by:
getNumberOfOctet in interface RemoteControl
Throws:
java.rmi.RemoteException

getNumberOfConnect

public int getNumberOfConnect()
                       throws java.rmi.RemoteException
Specified by:
getNumberOfConnect in interface RemoteControl
Throws:
java.rmi.RemoteException

getTimeOut

public int getTimeOut()
               throws java.rmi.RemoteException
Specified by:
getTimeOut in interface RemoteControl
Throws:
java.rmi.RemoteException

setAllowedMethod

public void setAllowedMethod(int request,
                             boolean value)
                      throws java.rmi.RemoteException
Specified by:
setAllowedMethod in interface RemoteControl
Throws:
java.rmi.RemoteException

setAllowedHeader

public void setAllowedHeader(java.lang.String id,
                             boolean value)
                      throws java.rmi.RemoteException
Specified by:
setAllowedHeader in interface RemoteControl
Throws:
java.rmi.RemoteException

getConnectionMax

public int getConnectionMax()
                     throws java.rmi.RemoteException
Specified by:
getConnectionMax in interface RemoteControl
Throws:
java.rmi.RemoteException

setTimeOut

public int setTimeOut(int timeOut)
               throws java.rmi.RemoteException
Specified by:
setTimeOut in interface RemoteControl
Throws:
java.rmi.RemoteException

setConnectionMax

public int setConnectionMax(int connectionMax)
                     throws java.rmi.RemoteException
Specified by:
setConnectionMax in interface RemoteControl
Throws:
java.rmi.RemoteException

setServerState

public void setServerState(java.lang.String state)
                    throws java.rmi.RemoteException
Specified by:
setServerState in interface RemoteControl
Throws:
java.rmi.RemoteException

getNumberOfActiveConection

public int getNumberOfActiveConection()
                               throws java.rmi.RemoteException
Specified by:
getNumberOfActiveConection in interface RemoteControl
Throws:
java.rmi.RemoteException

recordError

public void recordError()

recordRequest

public void recordRequest()

recordOctet

public void recordOctet(long octet)

recordConnect

public void recordConnect()

resetRecord

public void resetRecord()
                 throws java.rmi.RemoteException
Specified by:
resetRecord in interface RemoteControl
Throws:
java.rmi.RemoteException