uk.ac.ic.doc.automed.p2p
Class Constants

java.lang.Object
  extended by uk.ac.ic.doc.automed.p2p.Constants

public class Constants
extends java.lang.Object


Field Summary
static int CHANNEL_MULTICAST
          Send communication messages via multicast
static int CHANNEL_UNICAST
          Send communication messages via unicast
static java.lang.String CLIENT_DEDICATED
          Dedicated network client
static int CLIENT_SOCK_TIME_OUT
          default client time out (in milli-secs), this is especially useful in UDP communication where there is no way of knowing the status of the response (connectionless)
static java.lang.String CLIENT_SWITCHED
          Switched network client
static byte[] FOUND_NWK_HANDLER_FLAG
          A single-element byte array returned by RequestListener.handleEvent() method when the message that the listener receives is in fact meant for it
static int KA_STATUS_OFF
          Keep alive status: -1 means remote is not responding
static int KA_STATUS_ON
          Keep alive status: 1 means remote is responding
static java.lang.String LOOPBACK_ADDRESS
          The local host address: 127.0.0.1
static int MAX_SIZE_DIFFERENCE
          max number of bytes of difference b/w PACKET_SIZE and small data datagrams (used to fine-tune datagram fragmentation)
static java.lang.String MULTICAST_ALL_DSP_ADDRESS
          Muticast group address: ALL_DSP (Directory Service Peers)
static int MULTICAST_ALL_DSP_PORT
          Muticast group port: ALL_DSP (Directory Service Peers)
static java.lang.String MULTICAST_HOSTNAME
          Default multicast hostname which must resolve to the address of the interface used for multicast traffic
static java.lang.String OPT_HELLO
          Messaging type: hello protocol
static java.lang.String OPT_KEEP_ALIVE
          Messaging type: keep-alive
static java.lang.String OPT_LOGGING
          Messaging type: logging
static java.lang.String OPT_UNREGISTER
          Messaging type: unregistering client from registry and server
static java.lang.String OPT_UPDATE_DATA
          Messaging type: data update with directory server
static int PACKET_SIZE
          Send buffer sized for clients
static java.lang.String PEER_STATUS_ACTIVE
          Peer active status
static java.lang.String PEER_STATUS_FLUSH
          Peer garbage-collect status
static java.lang.String PEER_STATUS_INACTIVE
          Peer inactive status
static java.lang.String PROT_TCP
          Protocol: TCP
static java.lang.String PROT_UDP
          Protocol: UDP
static java.lang.String PROT_UDP_MULTICAST
          Protocol: UDP Multicast
static int RCV_BUFFER_SIZE
          Received buffer size used for clients
static boolean SINGLE_HANDLER_PER_EVENT
          assume that only one hander is registered for a network event
static int SIZE_THRESHOLD
          true threshold to differentiate b/w single- and multi-fragment UDP trunks
static int WAIT_NEXT_RECEIVE
          Time to wait (in millisecs) for receival of next fragment in the same trunk (used in UDP transmission involved package fragmentation)
static int WAIT_NEXT_SEND
          Time to wait (in millisecs) for next send of fragment in the same trunk (used in UDP transmission involved package fragmentation)
 
Constructor Summary
Constants()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPT_KEEP_ALIVE

public static final java.lang.String OPT_KEEP_ALIVE
Messaging type: keep-alive

See Also:
Constant Field Values

OPT_UNREGISTER

public static final java.lang.String OPT_UNREGISTER
Messaging type: unregistering client from registry and server

See Also:
Constant Field Values

OPT_UPDATE_DATA

public static final java.lang.String OPT_UPDATE_DATA
Messaging type: data update with directory server

See Also:
Constant Field Values

OPT_LOGGING

public static final java.lang.String OPT_LOGGING
Messaging type: logging

See Also:
Constant Field Values

OPT_HELLO

public static final java.lang.String OPT_HELLO
Messaging type: hello protocol

See Also:
Constant Field Values

PROT_TCP

public static final java.lang.String PROT_TCP
Protocol: TCP

See Also:
Constant Field Values

PROT_UDP

public static final java.lang.String PROT_UDP
Protocol: UDP

See Also:
Constant Field Values

PROT_UDP_MULTICAST

public static final java.lang.String PROT_UDP_MULTICAST
Protocol: UDP Multicast

See Also:
Constant Field Values

CLIENT_DEDICATED

public static final java.lang.String CLIENT_DEDICATED
Dedicated network client

See Also:
Constant Field Values

CLIENT_SWITCHED

public static final java.lang.String CLIENT_SWITCHED
Switched network client

See Also:
Constant Field Values

KA_STATUS_ON

public static final int KA_STATUS_ON
Keep alive status: 1 means remote is responding

See Also:
Constant Field Values

KA_STATUS_OFF

public static final int KA_STATUS_OFF
Keep alive status: -1 means remote is not responding

See Also:
Constant Field Values

MAX_SIZE_DIFFERENCE

public static final int MAX_SIZE_DIFFERENCE
max number of bytes of difference b/w PACKET_SIZE and small data datagrams (used to fine-tune datagram fragmentation)

See Also:
Constant Field Values

RCV_BUFFER_SIZE

public static final int RCV_BUFFER_SIZE
Received buffer size used for clients

See Also:
Constant Field Values

PACKET_SIZE

public static final int PACKET_SIZE
Send buffer sized for clients

See Also:
Constant Field Values

SIZE_THRESHOLD

public static final int SIZE_THRESHOLD
true threshold to differentiate b/w single- and multi-fragment UDP trunks

See Also:
Constant Field Values

CLIENT_SOCK_TIME_OUT

public static final int CLIENT_SOCK_TIME_OUT
default client time out (in milli-secs), this is especially useful in UDP communication where there is no way of knowing the status of the response (connectionless)

See Also:
Constant Field Values

WAIT_NEXT_SEND

public static final int WAIT_NEXT_SEND
Time to wait (in millisecs) for next send of fragment in the same trunk (used in UDP transmission involved package fragmentation)

See Also:
Constant Field Values

WAIT_NEXT_RECEIVE

public static final int WAIT_NEXT_RECEIVE
Time to wait (in millisecs) for receival of next fragment in the same trunk (used in UDP transmission involved package fragmentation)

See Also:
Constant Field Values

MULTICAST_ALL_DSP_ADDRESS

public static final java.lang.String MULTICAST_ALL_DSP_ADDRESS
Muticast group address: ALL_DSP (Directory Service Peers)

Note:
Use this attribute and MULTICAST_HOSTNAME to add a multicast route as follows (e.g. in Linux):
ip route add multicast 226.4.5.6/32 dev lo
OR
ip route add multicast 226.4.5.6/8 dev lo
where: lo (127.0.0.1) is, as resolved by MULTICAST_HOSTNAME, the interface used for multicast traffic.

See Also:
Constant Field Values

MULTICAST_ALL_DSP_PORT

public static final int MULTICAST_ALL_DSP_PORT
Muticast group port: ALL_DSP (Directory Service Peers)

See Also:
Constant Field Values

MULTICAST_HOSTNAME

public static final java.lang.String MULTICAST_HOSTNAME
Default multicast hostname which must resolve to the address of the interface used for multicast traffic

See Also:
Constant Field Values

LOOPBACK_ADDRESS

public static final java.lang.String LOOPBACK_ADDRESS
The local host address: 127.0.0.1

See Also:
Constant Field Values

CHANNEL_UNICAST

public static final int CHANNEL_UNICAST
Send communication messages via unicast

See Also:
Constant Field Values

CHANNEL_MULTICAST

public static final int CHANNEL_MULTICAST
Send communication messages via multicast

See Also:
Constant Field Values

PEER_STATUS_ACTIVE

public static final java.lang.String PEER_STATUS_ACTIVE
Peer active status


PEER_STATUS_INACTIVE

public static final java.lang.String PEER_STATUS_INACTIVE
Peer inactive status


FOUND_NWK_HANDLER_FLAG

public static final byte[] FOUND_NWK_HANDLER_FLAG
A single-element byte array returned by RequestListener.handleEvent() method when the message that the listener receives is in fact meant for it


SINGLE_HANDLER_PER_EVENT

public static final boolean SINGLE_HANDLER_PER_EVENT
assume that only one hander is registered for a network event

See Also:
Constant Field Values

PEER_STATUS_FLUSH

public static final java.lang.String PEER_STATUS_FLUSH
Peer garbage-collect status

Constructor Detail

Constants

public Constants()