at.ac.tuwien.infosys.sm4all.copal.service.copal
Interface ContextEventTypeRegistry

All Known Implementing Classes:
ContextEventTypeRegistryImpl

public interface ContextEventTypeRegistry

Interface which COPAL provides to register, unregister, and query ContextEventTypes.

Author:
sanjin

Field Summary
static String ALL_EVENT_TYPES
          The String used for event name when attaching ContextEventTypeObserver to signal that this ContextEventTypeObserver should receive notifications about all XMLContextEventType.
 
Method Summary
 void attach(String name, ContextEventTypeObserver observer)
          Attach given ContextEventTypeObserver so it will in future receive notifications for availability of XMLContextEventType with name equal to specified name.
 void detach(String name, ContextEventTypeObserver observer)
          Detach given ContextEventTypeObserver so it doesn't receive any future notifications for availability of XMLContextEventType with name equal to specified name.
 XMLContextEventType getEventType(String name)
          Returns XMLContextEventType with specified name.
 XMLContextEventType[] getEventTypes()
          Returns all currently registered XMLContextEventTypes.
 boolean isRegistered(String name)
          Checks if a XMLContextEventType with specified name is currently registered.
 boolean register(XMLContextEventType eventType)
          Register XMLContextEventType.
 boolean unregister(String name)
          Unregister XMLContextEventType with specified name.
 

Field Detail

ALL_EVENT_TYPES

static final String ALL_EVENT_TYPES
The String used for event name when attaching ContextEventTypeObserver to signal that this ContextEventTypeObserver should receive notifications about all XMLContextEventType.

See Also:
Constant Field Values
Method Detail

register

boolean register(XMLContextEventType eventType)
Register XMLContextEventType.

Parameters:
eventType - the XMLContextEventType.
Returns:
true if registration was successful; false otherwise.

unregister

boolean unregister(String name)
Unregister XMLContextEventType with specified name.

Parameters:
name - the name of the XMLContextEventType.
Returns:
true if unregistration was successful; false otherwise.

isRegistered

boolean isRegistered(String name)
Checks if a XMLContextEventType with specified name is currently registered.

Parameters:
name - the name of the XMLContextEventType.
Returns:
true if the XMLContextEventType with specified name is registered; false otherwise.

getEventTypes

XMLContextEventType[] getEventTypes()
Returns all currently registered XMLContextEventTypes.

Returns:
all currently registered XMLContextEventTypes.

getEventType

XMLContextEventType getEventType(String name)
Returns XMLContextEventType with specified name.

Parameters:
name - the name of the XMLContextEventType.
Returns:
the XMLContextEventType or null if there is no XMLContextEventType with specified name.

attach

void attach(String name,
            ContextEventTypeObserver observer)
Attach given ContextEventTypeObserver so it will in future receive notifications for availability of XMLContextEventType with name equal to specified name. If such XMLContextEventType is already registered, the ContextEventTypeObserver.onRegister(XMLContextEventType) method will also be invoked.

Parameters:
name - the name of the XMLContextEventType
observer - the ContextEventTypeObserver

detach

void detach(String name,
            ContextEventTypeObserver observer)
Detach given ContextEventTypeObserver so it doesn't receive any future notifications for availability of XMLContextEventType with name equal to specified name. If such XMLContextEventType is already registered, the ContextEventTypeObserver.onUnregister(XMLContextEventType) method will be also be invoked.

Parameters:
name - the name of the ContextEventType
observer - the ContextEventTypeObserver


Copyright © 2010 Distributed Systems Group, Vienna University of Technology. All Rights Reserved.