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

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

public interface ContextProcessorRegistry
extends Registry<java.lang.String,ContextProcessor>, Observable<RegistryObservable.RegistrationState,ContextProcessor,RegistryObservable.RegistryObserver<ContextProcessor>>

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

Author:
fei, sanjin

Method Summary
 ContextProcessor get(java.lang.String name)
          Returns the ContextProcessor with specified name.
 ContextProcessor[] getAll()
          Returns all currently registered ContextProcessors.
 ContextProcessor[] getAll(java.lang.String eventType)
          Returns all ContextProcessors which process events of specified event type.
 boolean isRegistered(java.lang.String name)
          Returns if a ContextProcessor with specified name is currently registered.
 void register(ContextProcessor processor)
          Register specified ContextProcessor.
 void unregister(java.lang.String name)
          Unregister ContextProcessor with specified name.
 
Methods inherited from interface at.ac.tuwien.infosys.sm4all.copal.api.util.Observable
attach, detach
 

Method Detail

register

void register(ContextProcessor processor)
              throws AlreadyRegisteredException
Register specified ContextProcessor.

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

unregister

void unregister(java.lang.String name)
                throws NotRegisteredException
Unregister ContextProcessor with specified name.

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

isRegistered

boolean isRegistered(java.lang.String name)
Returns if a ContextProcessor with specified name is currently registered.

Specified by:
isRegistered in interface Registry<java.lang.String,ContextProcessor>
Parameters:
name - the name of ContextProcessor.
Returns:
if a ContextProcessor with specified name is currently registered with COPAL.

get

ContextProcessor get(java.lang.String name)
Returns the ContextProcessor with specified name.

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

getAll

ContextProcessor[] getAll()
Returns all currently registered ContextProcessors.

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

getAll

ContextProcessor[] getAll(java.lang.String eventType)
Returns all ContextProcessors which process events of specified event type.

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


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