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

All Known Implementing Classes:
ContextPublisherRegistryImpl

public interface ContextPublisherRegistry

Interface which COPAL core provides to register, unregister, and query ContextPublishers.

Author:
fei, sanjin

Method Summary
 ContextPublisher getPublisher(String sourceID)
           
 ContextPublisher[] getPublishers()
           
 ContextPublisher[] getPublishers(String eventType)
           
 boolean isRegistered(String sourceID)
          Checks if a ContextPublisher with specified source ID is currently registered with COPAL core.
 boolean register(ContextPublisher publisher)
          Register ContextPublisher with COPAL core.
 boolean unregister(String sourceID)
          Unregister ContextPublisher with specified source ID from COPAL core.
 

Method Detail

register

boolean register(ContextPublisher publisher)
Register ContextPublisher with COPAL core.

Parameters:
publisher - the context publisher.
Returns:
true if registering was successful; false otherwise.

unregister

boolean unregister(String sourceID)
Unregister ContextPublisher with specified source ID from COPAL core.

Parameters:
sourceID - the source ID of a registered ContextPublisher.
Returns:
true if unregistering was successful; false otherwise.

isRegistered

boolean isRegistered(String sourceID)
Checks if a ContextPublisher with specified source ID is currently registered with COPAL core.

Parameters:
sourceID - the source id of ContextPublisher.
Returns:
true if the ContextPublisher with specified source ID is registered; false otherwise.

getPublishers

ContextPublisher[] getPublishers()
Returns:
all currently registered ContextPublishers.

getPublisher

ContextPublisher getPublisher(String sourceID)
Parameters:
sourceID - the source ID of a ContextPublisher.
Returns:
the ContextPublisher used in registration; or null if there is no registered ContextPublisher with specified source ID.

getPublishers

ContextPublisher[] getPublishers(String eventType)
Parameters:
eventType - the name of the ContextEventType.
Returns:
all ContextPublishers which publish events of ContextEventType that has name equal to specified eventType.


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