equip.data
Class DataSession

java.lang.Object
  extended byequip.runtime.Object
      extended byequip.runtime.ValueBase
          extended byequip.data.DataSession
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
DataSessionImpl

public abstract class DataSession
extends ValueBase

The interface used to register EventPatterns with a dataspace replica. All events from a single DataSession will be delivered to the single DataCallback or DataCallbackPost provided when the session was created.

Note: always use DataProxy.createSession(equip.data.DataCallback, equip.runtime.ValueBase) to get a data session.


Field Summary
 DataCallback callback
          internal - the callback DataCallback or DataCallbackPost
 ValueBase closure
          internal - the callback closure
 EventPattern[] patterns
          internal - the callback pattern of interest
 
Constructor Summary
DataSession()
          Default no-arg constructor
 
Method Summary
 boolean _equals_helper(DataSession c)
          Internal IDL-generated equality test helper
 boolean _matches_helper(DataSession c)
          Internal IDL-generated match test helper
abstract  void addPattern(EventPattern pattern)
          Add a new EventPattern to this session.
abstract  void addPatterns(EventPattern[] patterns)
          Add multiple new EventPatterns to this session.
abstract  void deletePattern(GUID id)
          Delete a previously added EventPattern from this session as identified by its GUID.
abstract  void deletePatterns(GUID[] ids)
          Delete multiple previously added EventPatterns from this session as identified by their GUIDs.
 boolean equals(java.lang.Object c)
          Standard IDL-generated equality test.
 java.lang.String getModuleName()
          IDL-generated helper routine to get module name (currently unimplemented).
abstract  EventPattern getPattern(GUID id)
          Helper API: get a current pattern by GUID (if present).
 boolean matches(java.lang.Object c)
          Standard IDL-generated template match test.
 void readObject(ObjectInputStream in)
          Internal IDL-generated serialisation helper.
 void writeObject(ObjectOutputStream out)
          Internal IDL-generated serialisation helper.
 
Methods inherited from class equip.runtime.ValueBase
_equals_helper, _matches_helper, clone
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

callback

public DataCallback callback
internal - the callback DataCallback or DataCallbackPost


closure

public ValueBase closure
internal - the callback closure


patterns

public EventPattern[] patterns
internal - the callback pattern of interest

Constructor Detail

DataSession

public DataSession()
Default no-arg constructor

Method Detail

addPattern

public abstract void addPattern(EventPattern pattern)
Add a new EventPattern to this session. Generates synchronous callbacks for local items.

Parameters:
pattern - The new event pattern of interest.

addPatterns

public abstract void addPatterns(EventPattern[] patterns)
Add multiple new EventPatterns to this session. Generates synchronous callbacks for local items.

Parameters:
patterns - The new event patterns of interest.

deletePattern

public abstract void deletePattern(GUID id)
Delete a previously added EventPattern from this session as identified by its GUID. Generates synchronous callbacks for local items.

Parameters:
id - The old event pattern's id.

deletePatterns

public abstract void deletePatterns(GUID[] ids)
Delete multiple previously added EventPatterns from this session as identified by their GUIDs. Generates synchronous callbacks for local items.

Parameters:
ids - The old event patterns' ids.

getPattern

public abstract EventPattern getPattern(GUID id)
Helper API: get a current pattern by GUID (if present).

Parameters:
id - The event pattern's id.
Returns:
The matching EventPattern item registered in this session, else null.

getModuleName

public java.lang.String getModuleName()
IDL-generated helper routine to get module name (currently unimplemented).

Overrides:
getModuleName in class Object
Returns:
name of this class's module

equals

public boolean equals(java.lang.Object c)
Standard IDL-generated equality test.

Overrides:
equals in class ValueBase
Parameters:
c - The object to be compared against this.
Returns:
true if this is equal to c

_equals_helper

public boolean _equals_helper(DataSession c)
Internal IDL-generated equality test helper


matches

public boolean matches(java.lang.Object c)
Standard IDL-generated template match test.

Overrides:
matches in class ValueBase
Parameters:
c - The object to be checked against this template.
Returns:
true if this (as a template) matches the argument

_matches_helper

public boolean _matches_helper(DataSession c)
Internal IDL-generated match test helper


writeObject

public void writeObject(ObjectOutputStream out)
                 throws java.io.IOException
Internal IDL-generated serialisation helper. Used by ObjectInputStream and ObjectOutputStream only.

Overrides:
writeObject in class ValueBase
Throws:
java.io.IOException

readObject

public void readObject(ObjectInputStream in)
                throws java.io.IOException,
                       java.lang.ClassNotFoundException,
                       java.lang.InstantiationException
Internal IDL-generated serialisation helper. Used by ObjectInputStream and ObjectOutputStream only.

Overrides:
readObject in class ValueBase
Throws:
java.io.IOException
java.lang.ClassNotFoundException
java.lang.InstantiationException