one.world.rep
Class RemoteDescriptor

java.lang.Object
  |
  +--one.world.core.Tuple
        |
        +--one.world.rep.RemoteDescriptor
All Implemented Interfaces:
Cloneable, Serializable

public class RemoteDescriptor
extends Tuple

Implementation of a remote export descriptor. This descriptor, used in a BindingRequest, includes an event handler to export and the descriptor tuple under which it is to be exported.

The type of the descriptor tuple determines how the event handler will be exported.

Version:
$Revision: 1.5 $
See Also:
Serialized Form

Field Summary
 Tuple descriptor
          The tuple to use for the event handler's descriptor.
 EventHandler handler
          The event handler to export to REP.
 boolean snoop
          If this flag is true, exports for reverse disovery will not consume events.
 
Fields inherited from class one.world.core.Tuple
CLOSURE, id, ID, META_DATA, metaData, SOURCE
 
Constructor Summary
RemoteDescriptor()
          Constructs a new, empty remote export descriptor.
RemoteDescriptor(EventHandler handler)
          Constructs a new anonymous event handler descriptor.
RemoteDescriptor(EventHandler handler, Query query, boolean snoop)
          Constructs a new event handler descriptor with the specified event handler, query, and snoop flag.
RemoteDescriptor(EventHandler handler, String name)
          Constructs a new named event handler descriptor with the specified event handler and name.
RemoteDescriptor(EventHandler handler, Tuple descriptor)
          Constructs a new event handler descriptor with the specified event handler and tuple descriptor.
 
Method Summary
 String toString()
          Returns a string representing this remote descriptor.
 void validate()
          Validates this remote export descriptor.
 
Methods inherited from class one.world.core.Tuple
clone, containsNonSymbolicHandler, equals, fields, get, getMetaData, getType, hasField, hashCode, hasMetaData, remove, set, setMetaData, wrap
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

handler

public EventHandler handler
The event handler to export to REP.

descriptor

public Tuple descriptor
The tuple to use for the event handler's descriptor.

snoop

public boolean snoop
If this flag is true, exports for reverse disovery will not consume events.
Constructor Detail

RemoteDescriptor

public RemoteDescriptor()
Constructs a new, empty remote export descriptor.

RemoteDescriptor

public RemoteDescriptor(EventHandler handler)
Constructs a new anonymous event handler descriptor. The descriptor tuple is null.
Parameters:
handler - The handler to export.

RemoteDescriptor

public RemoteDescriptor(EventHandler handler,
                        String name)
Constructs a new named event handler descriptor with the specified event handler and name. This constructor is provided as a convenience; the name is stored as a Name tuple.
Parameters:
handler - The handler to export to REP.
name - The name to assign to the event handler.

RemoteDescriptor

public RemoteDescriptor(EventHandler handler,
                        Tuple descriptor)
Constructs a new event handler descriptor with the specified event handler and tuple descriptor.
Parameters:
handler - The handler to export to REP.
descriptor - The descriptor to assign to the event handler.

RemoteDescriptor

public RemoteDescriptor(EventHandler handler,
                        Query query,
                        boolean snoop)
Constructs a new event handler descriptor with the specified event handler, query, and snoop flag.
Parameters:
handler - The handler to export to REP.
query - The query to use for reverse discovery.
snoop - true if this should not consume events.
Method Detail

validate

public void validate()
              throws TupleException
Validates this remote export descriptor.
Overrides:
validate in class Tuple
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)

toString

public String toString()
Returns a string representing this remote descriptor.
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