| java.lang.Object org.openharmonise.vfs.context.ContextHandler
ContextHandler | public class ContextHandler (Code) | | The context handler acts as the hub for context events. They are fired
at the handler and the handler then routes them to all the listeners
for that specific context type and the ALL context type.
author: Matthew Large version: $Revision: 1.1 $ |
addListener | public synchronized void addListener(ContextType contextType, ContextListener listener)(Code) | | Adds a context listener to a specified context type.
Parameters: contextType - Context type Parameters: listener - Context listener |
fireContextEvent | public void fireContextEvent(ContextEvent ce)(Code) | | Fires a context event to the relevant context listeners.
Parameters: ce - Context event |
getInstance | public static ContextHandler getInstance()(Code) | | Returns the instance of the context handler, following the
singleton patter.
Context handler |
getLastEvent | public ContextEvent getLastEvent(ContextType contextType)(Code) | | Returns the last recorded context event for a specified context
type.
Parameters: contextType - Context type Context event |
removeListener | public void removeListener(ContextType contextType, ContextListener listener)(Code) | | Removes a context listener from a specified context type.
Parameters: contextType - Context type Parameters: listener - Context listener |
|
|