gps.protocol.BT
Class BTEvent

java.lang.Object
  extended by gps.event.SimEvent
      extended by gps.protocol.BT.BTEvent
All Implemented Interfaces:
java.lang.Comparable

public class BTEvent
extends SimEvent

BT Event

Version:
1.2, 6/20/2005
Author:
Weishuai Yang

Field Summary
static int CONNECTION_DOWNLOAD_BLOCK_FINISH
          download block finish
static int CONNECTION_KEEP_ALIVE
          connection keep alive
static int CONNECTION_TIMEOUT
          check alive
static int PEER_MESSAGE
          peer receives a peer message
static int RECHOKING
          rechoking
static int REQUEST_TIMEOUT
          can make next request
static int SESSION_ANNOUNCEMENT
          scheduled announcement to tracker
static int SESSION_TRACKER_RESPONSE
          reply from server, handled by session
static int TRACKER_GET_REQUEST
          server receives a get, handled by tracker
static int USER_DOWNLOAD
          download a specific document from a server
static int USER_PUBLISH
          publish a document
static int USER_RANDOM_DOWNLOAD
          random download from a server
 
Fields inherited from class gps.event.SimEvent
SIM_AGENT_ACTIVE, SIM_AGENT_DEACTIVE, SIM_END, SIM_NODE_ACTIVE, SIM_NODE_DEACTIVE, SIM_START
 
Constructor Summary
BTEvent()
          dummy constructor
BTEvent(double timeStamp, int type, java.util.ArrayList handlerList, java.lang.Object obj)
          constructs a BTEvent object
BTEvent(double timeStamp, int type, SimEventHandler handler, java.lang.Object obj)
          constructs a BTEvent object
 
Method Summary
 java.lang.String typeString(int type)
          gets string description for type
 
Methods inherited from class gps.event.SimEvent
compareTo, dispatch, format, getAddParam, getEventID, getParam, getTimeStamp, getType, setAddParam, setEventID, setTimeStamp, setType, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

USER_PUBLISH

public static final int USER_PUBLISH
publish a document

See Also:
Constant Field Values

USER_DOWNLOAD

public static final int USER_DOWNLOAD
download a specific document from a server

See Also:
Constant Field Values

USER_RANDOM_DOWNLOAD

public static final int USER_RANDOM_DOWNLOAD
random download from a server

See Also:
Constant Field Values

TRACKER_GET_REQUEST

public static final int TRACKER_GET_REQUEST
server receives a get, handled by tracker

See Also:
Constant Field Values

PEER_MESSAGE

public static final int PEER_MESSAGE
peer receives a peer message

See Also:
Constant Field Values

SESSION_TRACKER_RESPONSE

public static final int SESSION_TRACKER_RESPONSE
reply from server, handled by session

See Also:
Constant Field Values

SESSION_ANNOUNCEMENT

public static final int SESSION_ANNOUNCEMENT
scheduled announcement to tracker

See Also:
Constant Field Values

CONNECTION_DOWNLOAD_BLOCK_FINISH

public static final int CONNECTION_DOWNLOAD_BLOCK_FINISH
download block finish

See Also:
Constant Field Values

RECHOKING

public static final int RECHOKING
rechoking

See Also:
Constant Field Values

CONNECTION_TIMEOUT

public static final int CONNECTION_TIMEOUT
check alive

See Also:
Constant Field Values

CONNECTION_KEEP_ALIVE

public static final int CONNECTION_KEEP_ALIVE
connection keep alive

See Also:
Constant Field Values

REQUEST_TIMEOUT

public static final int REQUEST_TIMEOUT
can make next request

See Also:
Constant Field Values
Constructor Detail

BTEvent

public BTEvent()
dummy constructor


BTEvent

public BTEvent(double timeStamp,
               int type,
               SimEventHandler handler,
               java.lang.Object obj)
constructs a BTEvent object

Parameters:
timeStamp - the moment this event is to be triggered
type - event type
handler - event handler object
obj - sender

BTEvent

public BTEvent(double timeStamp,
               int type,
               java.util.ArrayList handlerList,
               java.lang.Object obj)
constructs a BTEvent object

Parameters:
timeStamp - the moment this event is to be triggered
type - event type
handlerList - list of event handler objects
obj - sender
Method Detail

typeString

public java.lang.String typeString(int type)
gets string description for type

Overrides:
typeString in class SimEvent
Returns:
event type in string format