at.ac.tuwien.infosys.sm4all.copal.api.util
Interface Registry<K,V>

Type Parameters:
K - the type of keys maintained by this registry.
V - the type of values maintained by this registry.
All Known Subinterfaces:
ContextEventTypeRegistry, ContextProcessorRegistry, ContextPublisherRegistry
All Known Implementing Classes:
ActionQuery, Attributes, Authorizations, BaseRegistry, ContextEventTypeRegistryImpl, ContextProcessorRegistryImpl, ContextPublisherRegistryImpl, ProcessedEventQuery, RegistryService

public interface Registry<K,V>

The interface which represents a registry.

Author:
sanjin

Method Summary
 V get(K key)
          Returns the value with specified key.
 V[] getAll()
          Returns all currently registered values.
 boolean isRegistered(K key)
          Returns if a value with specified key is currently registered.
 void register(V value)
          Register specified value.
 void unregister(K key)
          Unregister a value with specified key.
 

Method Detail

register

void register(V value)
              throws ContextException
Register specified value.

Parameters:
value - the value.
Throws:
ContextException - if registration fails.

unregister

void unregister(K key)
                throws ContextException
Unregister a value with specified key.

Parameters:
key - the key.
Throws:
ContextException - if unregistration fails.

isRegistered

boolean isRegistered(K key)
Returns if a value with specified key is currently registered.

Parameters:
key - the key.
Returns:
if a value with specified key is currently registered.

get

V get(K key)
Returns the value with specified key.

Parameters:
key - the key.
Returns:
the value with specified key; or null if there is no such value registered.

getAll

V[] getAll()
Returns all currently registered values.

Returns:
all currently registered values.


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