one.world.rep
Class RemoteEvent
java.lang.Object
|
+--one.world.core.Tuple
|
+--one.world.core.Event
|
+--one.world.rep.RemoteEvent
- All Implemented Interfaces:
- Cloneable, Serializable
- public final class RemoteEvent
- extends Event
Implements a remote event, an event which is to be delivered to a
remote host.
- Version:
- $Revision: 1.12 $
- See Also:
- Serialized Form
|
Field Summary |
boolean |
datagram
If the datagram flag is true, the event should be sent via an
unreliable datagram. |
SymbolicHandler |
destination
A descriptor for the destination event handler. |
Event |
event
The event to send to the destination handler. |
|
Constructor Summary |
RemoteEvent()
Constructs a new, empty remote event. |
RemoteEvent(EventHandler source,
Object closure,
SymbolicHandler destination,
Event event)
Constructs a new remote event to be sent via reliable transport
with the given source, closure, destination, and event. |
RemoteEvent(EventHandler source,
Object closure,
SymbolicHandler destination,
Event event,
boolean datagram)
Constructs a new remote event with the given source, closure,
destination, event, and datagram flag. |
|
Method Summary |
String |
toString()
Get a string represention for this remote event. |
void |
validate()
Validate this remote event. |
void |
verifySymbolic()
Verify that all event handlers in this remote event (other than the
source) are symbolic. |
| Methods inherited from class one.world.core.Tuple |
clone, containsNonSymbolicHandler, equals, fields, get, getMetaData, getType, hasField, hashCode, hasMetaData, remove, set, setMetaData, wrap |
destination
public SymbolicHandler destination
- A descriptor for the destination event handler.
event
public Event event
- The event to send to the destination handler. All event
handlers refered to in the event should be
symbolic.
datagram
public boolean datagram
- If the datagram flag is true, the event should be sent via an
unreliable datagram. Otherwise, the event will be sent via TCP.
RemoteEvent
public RemoteEvent()
- Constructs a new, empty remote event.
RemoteEvent
public RemoteEvent(EventHandler source,
Object closure,
SymbolicHandler destination,
Event event)
- Constructs a new remote event to be sent via reliable transport
with the given source, closure, destination, and event. All event
handlers refered to in the event should be
symbolic.
- Parameters:
source - The source of the new remote event.closure - The closure for the new remote event.destination - The destination for the new remote event.event - The event to be encapsulated by the new remote event.
RemoteEvent
public RemoteEvent(EventHandler source,
Object closure,
SymbolicHandler destination,
Event event,
boolean datagram)
- Constructs a new remote event with the given source, closure,
destination, event, and datagram flag. All event
handlers refered to in the event should be
symbolic.
- Parameters:
source - The source of the new remote event.closure - The closure for the new remote event.destination - The destination for the new remote event.event - The event to be encapsulated by the new remote event.datagram - True if the event should be sent via an unreliable
datagram.
validate
public void validate()
throws TupleException
- Validate this remote event.
- Overrides:
validate in class Event
- Following copied from class:
one.world.core.Tuple
- Throws:
TupleException - Signals that the tuple is either malformed
(i.e., does not conform to the tuple
specification) or invalid (i.e., does not
conform to the semantic constraints of its
type).- See Also:
MalformedTupleException,
InvalidTupleException,
Type.validate(Class)
verifySymbolic
public void verifySymbolic()
throws InvalidTupleException
- Verify that all event handlers in this remote event (other than the
source) are symbolic.
- Throws:
InvalidTupleException - if any nested event handler is not
symbolic.
toString
public String toString()
- Get a string represention for this remote event.
- Overrides:
toString in class Tuple
- Following copied from class:
one.world.core.Tuple
- Returns:
- A string representation for this tuple.
(C) Copyright 2001 UW CSE