obixserver.core.engine
Interface ObjBroker

All Superinterfaces:
Service
All Known Implementing Classes:
ObjBrokerImpl

public interface ObjBroker
extends Service

ObjBroker defines operations that are used to load, create, add, remove and manage obix Obj's and provides a facade to Obj cache and overall object management.

It also provides a facade to watch and feed management and other horizontal modules.

Management of objects include object update notifications from modules.

Author:
Peter Michalek

Method Summary
 void addCondition(Condition condition)
          Adds an alarm to the system.
 void addFeed(obix.Feed feed, List feedSet)
          Adds a set of Obj's to a feed.
 obix.Obj addObj(obix.Obj obj)
          Adds object to object repository.
 void addObjTree(obix.Obj obj)
          Adds object and its children to the object repository, recursively.
 void addProxy(String uri, ObjProxy proxy)
          Adds a proxy obj.
 void addToFeed(obix.Feed feedObj, obix.Obj obj)
          Adds obj to all feeds associated with given feed obj.
 void clearFeed(obix.Feed feed)
          Clears a feed.
 String getBaseUri()
          Get base URI for this server.
 List getFeed(obix.Feed feed)
          Returns the set of Obj's that belong to a feed.
 obix.Obj getObj(String uri)
          Returns Obj for given URI in the Obj repository.
 obix.Obj invoke(obix.Obj obj, String input, String method)
          Invokes processing for operation Obj's (Op Obj's).
 void notifyStatusChange(List objList)
          Notifies about status change via a list of changed Obj's.
 void notifyStatusChange(obix.Obj obj)
          Notifies about status change.
 void notifyStatusChangeRecursive(obix.Obj obj)
          Notifies about status change recursively for passed obj and its children.
 void removeObjTree(obix.Obj obj)
          Removes obj and its children from object repository.
 void updateObject(obix.Obj obj)
          Updates obj in the repository.
 
Methods inherited from interface obixserver.core.Service
start, stop
 

Method Detail

getBaseUri

String getBaseUri()
Get base URI for this server. Example: http://obixserver:1225

Returns:
the base URI

updateObject

void updateObject(obix.Obj obj)
Updates obj in the repository.

Parameters:
obj - Obj to update
Throws:
IllegalArgumentException - if obj doesn't exist in the repository

notifyStatusChangeRecursive

void notifyStatusChangeRecursive(obix.Obj obj)
Notifies about status change recursively for passed obj and its children.

Parameters:
obj - object whose status has changed
Throws:
IllegalArgumentException - if obj doesn't exist in the repository

notifyStatusChange

void notifyStatusChange(obix.Obj obj)
Notifies about status change.

Parameters:
obj - obj whose status has changed
Throws:
IllegalArgumentException - if obj doesn't exist in the repository

notifyStatusChange

void notifyStatusChange(List objList)
Notifies about status change via a list of changed Obj's.

Parameters:
objList - list of Obj's whose status has changed
Throws:
IllegalArgumentException - if obj doesn't exist in the repository

invoke

obix.Obj invoke(obix.Obj obj,
                String input,
                String method)
                throws ObixserverException
Invokes processing for operation Obj's (Op Obj's).

Parameters:
obj - target on which invocation is performed
input - input string for invocation
method - HTTP method of invocation
Returns:
resulting return Obj of invocation
Throws:
ObixserverException

addObj

obix.Obj addObj(obix.Obj obj)
Adds object to object repository. Obj's href has to be set to the appropriate full path. Obj instance may be replaced during this operation by an invocation target obj defined in and loaded from the configuration.

Parameters:
obj - obj to add
Returns:
the obj added, which may be different from the one requested to be added
Throws:
Illegal - ObixserverException with code ERROR_BAD_URI if href is not set properly

addObjTree

void addObjTree(obix.Obj obj)
Adds object and its children to the object repository, recursively. This assumes that there is no loop in the tree, i.e. child can't have a predecessor as a child.

Parameters:
obj - obj to add

removeObjTree

void removeObjTree(obix.Obj obj)
Removes obj and its children from object repository.

Parameters:
obj - obj to remove

addFeed

void addFeed(obix.Feed feed,
             List feedSet)
Adds a set of Obj's to a feed.

Parameters:
feed -
feedSet -

addToFeed

void addToFeed(obix.Feed feedObj,
               obix.Obj obj)
Adds obj to all feeds associated with given feed obj.

Parameters:
feedObj -
obj -

clearFeed

void clearFeed(obix.Feed feed)
Clears a feed.

Parameters:
feed -

getFeed

List getFeed(obix.Feed feed)
Returns the set of Obj's that belong to a feed.

Parameters:
feed -

addProxy

void addProxy(String uri,
              ObjProxy proxy)
Adds a proxy obj.

Parameters:
uri -
proxy -

getObj

obix.Obj getObj(String uri)
Returns Obj for given URI in the Obj repository.

Parameters:
uri -
Returns:
Obj or null if no Obj found for given URI

addCondition

void addCondition(Condition condition)
Adds an alarm to the system.

Parameters:
condition -


Copyright © 2006-2008 Peter Michalek All Rights Reserved.