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

All Superinterfaces:
Observable<RegistryObservable.RegistrationState,ContextPublisher,RegistryObservable.RegistryObserver<ContextPublisher>>, Registry<java.lang.String,ContextPublisher>
All Known Implementing Classes:
ContextPublisherRegistryImpl

public interface ContextPublisherRegistry
extends Registry<java.lang.String,ContextPublisher>, Observable<RegistryObservable.RegistrationState,ContextPublisher,RegistryObservable.RegistryObserver<ContextPublisher>>

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

Author:
fei, sanjin

Method Summary
 ContextPublisher get(java.lang.String sourceID)
          Returns the ContextPublisher with specified source ID.
 ContextPublisher[] getAll()
          Returns all currently registered ContextPublishers.
 ContextPublisher[] getAll(java.lang.String eventType)
          Returns all ContextPublishers which publish events of specified event type.
 boolean isRegistered(java.lang.String sourceID)
          Returns if a ContextPublisher with specified source ID is currently registered with COPAL.
 void register(ContextPublisher publisher)
          Register ContextPublisher with COPAL.
 void unregister(java.lang.String sourceID)
          Unregister ContextPublisher with specified source ID from COPAL.
 
Methods inherited from interface at.ac.tuwien.infosys.sm4all.copal.api.util.Observable
attach, detach
 

Method Detail

register

void register(ContextPublisher publisher)
              throws AlreadyRegisteredException
Register ContextPublisher with COPAL.

Specified by:
register in interface Registry<java.lang.String,ContextPublisher>
Parameters:
publisher - the context publisher.
Throws:
AlreadyRegisteredException - if a ContextEventType with same name is already registered.

unregister

void unregister(java.lang.String sourceID)
                throws NotRegisteredException
Unregister ContextPublisher with specified source ID from COPAL.

Specified by:
unregister in interface Registry<java.lang.String,ContextPublisher>
Parameters:
sourceID - the source ID of a registered ContextPublisher.
Throws:
NotRegisteredException - if no ContextPublisher with specified source ID is registered.

isRegistered

boolean isRegistered(java.lang.String sourceID)
Returns if a ContextPublisher with specified source ID is currently registered with COPAL.

Specified by:
isRegistered in interface Registry<java.lang.String,ContextPublisher>
Parameters:
sourceID - the source id of ContextPublisher.
Returns:
if a ContextPublisher with specified source ID is currently registered with COPAL.

get

ContextPublisher get(java.lang.String sourceID)
Returns the ContextPublisher with specified source ID.

Specified by:
get in interface Registry<java.lang.String,ContextPublisher>
Parameters:
sourceID - the source ID of a ContextPublisher.
Returns:
the ContextPublisher used in registration; or null if there is no such ContextPublisher registered.

getAll

ContextPublisher[] getAll()
Returns all currently registered ContextPublishers.

Specified by:
getAll in interface Registry<java.lang.String,ContextPublisher>
Returns:
all currently registered ContextPublishers.

getAll

ContextPublisher[] getAll(java.lang.String eventType)
Returns all ContextPublishers which publish events of specified event type.

Parameters:
eventType - the name of the ContextEventType.
Returns:
all ContextPublishers which publish events of specified event type.


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