|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xngr.context.ServiceContextManager
public class ServiceContextManager
Manages the association of services and actions with URIs and Nodes.
| Nested Class Summary | |
|---|---|
class |
ServiceContextManager.RootElementFoundException
|
class |
ServiceContextManager.SimpleErrorHandler
|
| Constructor Summary | |
|---|---|
protected |
ServiceContextManager()
|
|
ServiceContextManager(org.osgi.framework.BundleContext context)
Initialises the service manager. |
| Method Summary | |
|---|---|
protected void |
add(Action action)
Adds an action to the manager. |
protected void |
add(Marker marker)
Adds a marker to the manager. |
protected void |
add(Service service)
Adds a service to the manager. |
void |
dispose()
Releases all the resources. |
protected void |
fireActionsChanged(Action source,
ServiceContextEvent.Type type)
Called when actions have been changed. |
protected void |
fireMarkersChanged(Marker source,
ServiceContextEvent.Type type)
Called when markers have been changed. |
protected void |
fireServicesChanged(Service source,
ServiceContextEvent.Type type)
Called when services have been changed. |
ServiceContext |
getContext(java.net.URI uri)
|
protected void |
remove(Action action)
Calls close on the service and removes it from the manager. |
protected void |
remove(Marker marker)
Removes a marker from the manager. |
protected void |
remove(Service service)
Calls close on the service and removes it from the manager. |
void |
start()
Starts the tracking of Services and Actions, only needs to be used after a stop() has been called. |
void |
stop()
Stops the tracking of Services and Actions. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceContextManager(org.osgi.framework.BundleContext context)
protected ServiceContextManager()
| Method Detail |
|---|
protected void add(Service service)
service - the to be added service.protected void add(Action action)
action - the to be added action.protected void add(Marker marker)
marker - the to be added marker.protected void remove(Service service)
service - the service to be removed from the manager.protected void remove(Action action)
service - the service to be removed from the manager.protected void remove(Marker marker)
marker - the to be removed marker.
public ServiceContext getContext(java.net.URI uri)
throws java.io.IOException
uri - the uri to find the service-context for, cannot be null.
java.io.IOException - when no stream can be opened (or closed) for the URI.public void stop()
public void start()
public void dispose()
protected void fireServicesChanged(Service source,
ServiceContextEvent.Type type)
source - the changed servicetype - the type of change, ADDED, REMOVED or CHANGED.
protected void fireMarkersChanged(Marker source,
ServiceContextEvent.Type type)
source - the changed markertype - the type of change, ADDED, REMOVED or CHANGED.
protected void fireActionsChanged(Action source,
ServiceContextEvent.Type type)
source - the changed actiontype - the type of change, ADDED, REMOVED or CHANGED.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||