|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Context
Public interface through which users perform push/pull operation on context data.
| Method Summary | |
|---|---|
void |
attachAttribute(java.lang.String attribute,
Attribute attr)
Attach Attribute at specified location. |
void |
attachResource(java.lang.String resource,
Resource res)
Attach Resource at specified location. |
void |
createAttribute(java.lang.String attribute,
java.lang.Object value)
Creates a new attribute. |
void |
createPeriodicAttributePoller(java.lang.String attribute,
long duration,
java.util.concurrent.TimeUnit unit)
Periodically creates an AttributeChangedEvent where old and new values are equal. |
Query |
createQuery(java.lang.String query)
Creates and starts a query. |
void |
createResource(java.lang.String resource)
Creates Resource along a path. |
void |
createSymlink(java.lang.String link,
java.lang.String target)
Creates and attach a Symlink. |
void |
destroy()
Destroy this context. |
void |
destroyQuery(Query query)
Detach all listener and destroy query. |
void |
detachAttribute(java.lang.String attribute)
Detach an attribute. |
void |
detachResource(java.lang.String resource)
Detach a resource. |
void |
emitEvent(WEvent... events)
Emit event(s). |
void |
export()
Allow the context for remote connections. |
Attribute |
getAttribute(java.lang.String attribute)
Return the attribute at specified location. |
java.lang.String |
getName()
|
Resource |
getResource(java.lang.String resource)
Return the resource at specified location. |
java.lang.Object |
getValue(java.lang.String attribute)
Fetch attribute value. |
boolean |
isRemoteContextAvailable(java.lang.String context)
|
java.util.Set<java.lang.String> |
list(java.lang.String resource)
List resources and attributes. |
boolean |
listen(java.lang.String source)
Listen for events coming from the context with the given name. |
void |
pauseQuery(Query query)
Pause Query. |
void |
registerListeners(Query query,
net.esper.client.UpdateListener... listeners)
Attach one or more listener to a query. |
Query |
registerListeners(java.lang.String query,
net.esper.client.UpdateListener... listeners)
Creates and starts a query and register one or more listener. |
void |
removeListeners(Query query,
net.esper.client.UpdateListener... listeners)
Removes one or more listeners associated with a Query. |
void |
removePeriodicAttributePoller(java.lang.String attribute)
Remove an attribute poller. |
void |
resumeQuery(Query query)
Resume Query. |
java.lang.Object |
setValue(java.lang.String attribute,
java.lang.Object value)
Set Attribute's value. |
void |
unexport()
Don't allow the context for remote connections. |
| Method Detail |
|---|
java.lang.String getName()
void attachAttribute(java.lang.String attribute,
Attribute attr)
throws ContextException
attribute - path of the Attributeattr - an Attribute
ContextException - if the attribute cannot be attached
void createAttribute(java.lang.String attribute,
java.lang.Object value)
throws ContextException
attribute - path of the attributevalue - initial value of the attribute
ContextException - if the attribute cannot be created
void detachAttribute(java.lang.String attribute)
throws ContextException
attribute - path of the attribute
ContextException - if the attribute cannot be detached
void createResource(java.lang.String resource)
throws ContextException
resource - path to create
ContextException - if the resource cannot be created
Resource getResource(java.lang.String resource)
throws ContextException
resource - path of the Resource
ContextException - if the resource cannot be returned
void attachResource(java.lang.String resource,
Resource res)
throws ContextException
resource - path of the Resourceres - a Resource
ContextException - if the resource cannot be attached
void detachResource(java.lang.String resource)
throws ContextException
resource - path of the Resource
ContextException - if the resource cannot be detached
void createSymlink(java.lang.String link,
java.lang.String target)
throws ContextException
link - attach pointtarget - target path of the symbolic link
ContextException - if the Symlink cannot be created
Attribute getAttribute(java.lang.String attribute)
throws ContextException
attribute - the path of the attribute
ContextException - if the attribute cannot be retrieved
java.lang.Object getValue(java.lang.String attribute)
throws ContextException
attribute - the path of the attribute
ContextException - if the attribute cannot be accessed
java.lang.Object setValue(java.lang.String attribute,
java.lang.Object value)
throws ContextException
attribute - path of the Attributevalue - new value of the Attribute
ContextException - if the attribute cannot be accessed
java.util.Set<java.lang.String> list(java.lang.String resource)
throws ContextException
resource - the resource to inspect
ContextException - if the resource cannot be accessedvoid emitEvent(WEvent... events)
events - one or more event to emit
void createPeriodicAttributePoller(java.lang.String attribute,
long duration,
java.util.concurrent.TimeUnit unit)
throws ContextException
attribute - the location of the attribute to pollduration - the periodunit - the period unit
ContextException - if the attribute poller cannot be created
void removePeriodicAttributePoller(java.lang.String attribute)
throws ContextException
attribute - the location of the attribute to poll
ContextException - if the attribute poller cannot be deletedQuery createQuery(java.lang.String query)
query - the query
void pauseQuery(Query query)
query - query's referencevoid resumeQuery(Query query)
query - query's referencevoid destroyQuery(Query query)
query - the reference of the query
Query registerListeners(java.lang.String query,
net.esper.client.UpdateListener... listeners)
query - the querylisteners - 0 or more listeners
void registerListeners(Query query,
net.esper.client.UpdateListener... listeners)
query - query referencelisteners - one or more listener to attach
void removeListeners(Query query,
net.esper.client.UpdateListener... listeners)
query - the query from which to detachlisteners - the listeners to detach
void export()
throws ContextException
ContextException - if this context cannot be exported
void unexport()
throws ContextException
ContextException - if this context cannot be unexportedboolean listen(java.lang.String source)
source - a context name
boolean isRemoteContextAvailable(java.lang.String context)
context - a context name
void destroy()
throws ContextException
ContextException - if it cannot be destroyed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||