jgroup.relacs.simulator
Interface SocketStatus

All Superinterfaces:
java.rmi.Remote
All Known Implementing Classes:
SocketStatusImpl

public interface SocketStatus
extends java.rmi.Remote

SocketStatus is a remote interface for assigning probabilities to channels in the distributed system.

Since:
Jgroup 0.5 (revised Jgroup 2.2)
Author:
Alberto Montresor, Hein Meling

Field Summary
static int BASE
          Reliable channel
static java.lang.String SOCKET_STATUS
          Registry lookup name
 
Method Summary
 void commit()
          This method must be invoked before the current reachability pattern will be activated.
 java.util.Map<java.net.InetAddress,java.lang.Integer> getStatus()
          Returns the content of the current socket status object.
 void notifyStatus(java.util.Map<java.net.InetAddress,java.lang.Integer> commitedLinks)
          Notifies any registered socket status implementations of the most recently commited reachability pattern of the local socket status instance.
 void register(SocketStatus sStatus)
          Register the given socket status object with this socket status implementation, so as to notify the other socket status instances of changes to the reachability pattern.
 void setStatus(java.net.InetAddress inet, int prob)
          Set the probability of a datagram packet to be correctly delivered at the host identified by inet.
 

Field Detail

BASE

static final int BASE
Reliable channel

See Also:
Constant Field Values

SOCKET_STATUS

static final java.lang.String SOCKET_STATUS
Registry lookup name

See Also:
Constant Field Values
Method Detail

register

void register(SocketStatus sStatus)
              throws java.rmi.RemoteException
Register the given socket status object with this socket status implementation, so as to notify the other socket status instances of changes to the reachability pattern.

Throws:
java.rmi.RemoteException

commit

void commit()
            throws java.rmi.RemoteException
This method must be invoked before the current reachability pattern will be activated. That is, after invoking a series of setStatus methods, an invocation of this method will activate the newly set reachability pattern.

Throws:
java.rmi.RemoteException

notifyStatus

void notifyStatus(java.util.Map<java.net.InetAddress,java.lang.Integer> commitedLinks)
                  throws java.rmi.RemoteException
Notifies any registered socket status implementations of the most recently commited reachability pattern of the local socket status instance. This can be used by socket status instances running in a JVM separate from the BootstrapRegistry.

Throws:
java.rmi.RemoteException

getStatus

java.util.Map<java.net.InetAddress,java.lang.Integer> getStatus()
                                                                throws java.rmi.RemoteException
Returns the content of the current socket status object. This is used to obtain the state of a socket status object running in another JVM on the local machine.

Throws:
java.rmi.RemoteException

setStatus

void setStatus(java.net.InetAddress inet,
               int prob)
               throws java.rmi.RemoteException
Set the probability of a datagram packet to be correctly delivered at the host identified by inet. The probability is defined as prob / BASE.

Throws:
java.rmi.RemoteException


Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.