org.apache.felix.ipojo
Interface ContextSource


public interface ContextSource

Context Source service interface. A context source advertises of context changes.

Author:
Felix Project Team

Method Summary
 Dictionary getContext()
          Gets the entire context.
 Object getProperty(String property)
          Gets the current value of the given property.
 void registerContextListener(ContextListener listener, String[] properties)
          Registers a context listener on the given set of properties.
 void unregisterContextListener(ContextListener listener)
          Unregisters the given context listener.
 

Method Detail

getProperty

Object getProperty(String property)
Gets the current value of the given property.

Parameters:
property - property name
Returns:
the property value (null if unknown)

getContext

Dictionary getContext()
Gets the entire context.

Returns:
the dictionary [Property, Value]

registerContextListener

void registerContextListener(ContextListener listener,
                             String[] properties)
Registers a context listener on the given set of properties. The listener will be notified of every changes made on monitored properties.

Parameters:
listener - the context listener to register.
properties - property set monitored by the listener.

unregisterContextListener

void unregisterContextListener(ContextListener listener)
Unregisters the given context listener.

Parameters:
listener - the listener to unregister.


Copyright © 2011 Apache Software Foundation. All Rights Reserved.