|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.cscc.CommunicationEvent
This class represents a communication event. A communication event
describes events that occur between the communication of
two communication partners. This specific type of event is identified by
a numeric id which can be retrieved with the method
getEventId()
. The event can also contain some additional
data, for example the id of the communication partner.
2003-05-14 SM First Version 2003-05-14 SM working on additional methods and events, correction of some comments. 2003-05-20 TR Comments corrected 2006-10-29 SM Comments revised.
Field Summary | |
protected java.lang.Object |
additionalData
Stores additional data about the communication event. |
static int |
CONNECTION_BROKEN
Describes the type of event which occurs if the connection breaks. |
static int |
CONNECTION_CLOSED
Describes the normal closing of connection by one of the communication partners. |
static int |
CONNECTION_ESTABLISHED
Constant describes if the connection was established. |
static int |
CONNECTION_START_LISTENING
Constant describes the start of a listener thread. |
static int |
CONNECTION_STOP_LISTENING
Constant describes the end of a listening thread. |
protected int |
eventId
Stores a numeric id about the event. |
Constructor Summary | |
CommunicationEvent(int id)
Constructor initializes the object. |
|
CommunicationEvent(int id,
java.lang.Object data)
Constructor initializes the object. |
Method Summary | |
java.lang.Object |
getData()
This method returns the additional data of the message. |
int |
getEventId()
This method returns the event id. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int CONNECTION_ESTABLISHED
public static final int CONNECTION_BROKEN
public static final int CONNECTION_CLOSED
public static final int CONNECTION_START_LISTENING
public static final int CONNECTION_STOP_LISTENING
protected int eventId
protected java.lang.Object additionalData
Constructor Detail |
public CommunicationEvent(int id, java.lang.Object data)
id
- Identifies the communication event uniquely.data
- Some additional data which can also be provided
with the event. This can be, for example, an identification
object for the communication partner which caused the event.
public CommunicationEvent(int id)
id
- Identifies the communication event uniquely.
Method Detail |
public java.lang.Object getData()
public int getEventId()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |