|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.ubik.mcast.RemoteEvent
public class RemoteEvent
Models a multicast event. An instance of this class strictly encapsulates its data in the form of strings, in order to avoid classloading issues when serializing/deserializing in a networked environment. A multicast is sent to a domain, or to all domains, according to the domain name information that is kept an the event.
Furthermore, a multicast event has a "type", which provides the event's logical type - and allows applications to register for events of a given logical type.
Finally, data can also be passed.
| Constructor Summary | |
|---|---|
RemoteEvent(java.lang.String type,
java.lang.Object data)
Creates an instance of this class that is targeted at all domains. |
|
RemoteEvent(java.lang.String domain,
java.lang.String type,
java.lang.Object data)
Creates an instance of this class. |
|
| Method Summary | |
|---|---|
java.lang.Object |
getData()
Returns this instance's data. |
java.lang.String |
getDomainName()
Returns this instance's domain name. |
long |
getId()
Returns this event's unique identifier. |
java.lang.String |
getNode()
Returns the identifier of the node that sent this event. |
java.lang.String |
getType()
Returns this instance's logical typeentifier. |
boolean |
hasDomainName()
Returns true if this instance was created with a
domain name - meaning that it was targeted at a single domain. |
boolean |
isSync()
Returns true if this instance represents an event
that necessitates a synchronous response. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RemoteEvent(java.lang.String domain,
java.lang.String type,
java.lang.Object data)
throws java.io.IOException
the - name of the domain to which this instance is targeted.type - the event's type, which in fact is its logical type.data - the event's data.
java.io.IOException
public RemoteEvent(java.lang.String type,
java.lang.Object data)
throws java.io.IOException
type - the event's type, which in fact is its logical type.data - the event's data.
java.io.IOException| Method Detail |
|---|
public java.lang.String getDomainName()
null if this instance
is not targeted at a single domain.public java.lang.String getType()
public long getId()
public java.lang.Object getData()
throws java.io.IOException
null if this
instance has no data.
java.io.IOExceptionpublic boolean hasDomainName()
true if this instance was created with a
domain name - meaning that it was targeted at a single domain.
true if this instance has a domain name.public boolean isSync()
true if this instance represents an event
that necessitates a synchronous response.
public java.lang.String getNode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||