net.dpml.station
Interface ApplicationRegistry

All Superinterfaces:
Remote
All Known Implementing Classes:
RemoteApplicationRegistry

public interface ApplicationRegistry
extends Remote

Registry of application profiles.


Field Summary
static URI DEFAULT_STORAGE_URI
          The default storage uri.
 
Method Summary
 void addApplicationDescriptor(String key, ApplicationDescriptor descriptor)
          Add an application descriptor to the registry.
 void addRegistryListener(RegistryListener listener)
          Add a registry change listener.
 void flush()
          Request externalization of the registry state.
 ApplicationDescriptor getApplicationDescriptor(String key)
          Get an application descriptor matching the supplied key.
 int getApplicationDescriptorCount()
          Return the number of application descriptors in the registry.
 ApplicationDescriptor[] getApplicationDescriptors()
          Return an array of all profiles in the registry.
 String[] getKeys()
          Return the array of application keys.
 void removeApplicationDescriptor(String key)
          Remove an application descriptor from the registry.
 void removeRegistryListener(RegistryListener listener)
          Remove a registry change listener.
 void updateApplicationDescriptor(String key, ApplicationDescriptor descriptor)
          Replace an application descriptor within the registry with a supplied descriptor.
 

Field Detail

DEFAULT_STORAGE_URI

public static final URI DEFAULT_STORAGE_URI
The default storage uri.

Method Detail

getKeys

public String[] getKeys()
                 throws RemoteException
Return the array of application keys.

Returns:
the application key array
Throws:
RemoteException - if a transport error occurs

getApplicationDescriptorCount

public int getApplicationDescriptorCount()
                                  throws RemoteException
Return the number of application descriptors in the registry.

Returns:
the application descriptor count
Throws:
RemoteException - if a transport error occurs

getApplicationDescriptors

public ApplicationDescriptor[] getApplicationDescriptors()
                                                  throws RemoteException
Return an array of all profiles in the registry.

Returns:
the application profiles
Throws:
RemoteException - if a transport error occurs

addApplicationDescriptor

public void addApplicationDescriptor(String key,
                                     ApplicationDescriptor descriptor)
                              throws DuplicateKeyException,
                                     RemoteException
Add an application descriptor to the registry.

Parameters:
key - the application key
descriptor - the application descriptor
Throws:
DuplicateKeyException - if the key is already assigned
RemoteException - if a transport error occurs

getApplicationDescriptor

public ApplicationDescriptor getApplicationDescriptor(String key)
                                               throws UnknownKeyException,
                                                      RemoteException
Get an application descriptor matching the supplied key.

Parameters:
key - the application key
Returns:
the application descriptor
Throws:
UnknownKeyException - if the key is unknown
RemoteException - if a transport error occurs

updateApplicationDescriptor

public void updateApplicationDescriptor(String key,
                                        ApplicationDescriptor descriptor)
                                 throws UnknownKeyException,
                                        RemoteException
Replace an application descriptor within the registry with a supplied descriptor.

Parameters:
key - the application key
descriptor - the updated application descriptor
Throws:
UnknownKeyException - if the key is unknown
RemoteException - if a transport error occurs

removeApplicationDescriptor

public void removeApplicationDescriptor(String key)
                                 throws UnknownKeyException,
                                        RemoteException
Remove an application descriptor from the registry.

Parameters:
key - the application key
Throws:
UnknownKeyException - if the key is unknown
RemoteException - if a transport error occurs

addRegistryListener

public void addRegistryListener(RegistryListener listener)
                         throws RemoteException
Add a registry change listener.

Parameters:
listener - the registry change listener to add
Throws:
RemoteException - if a transport error occurs

removeRegistryListener

public void removeRegistryListener(RegistryListener listener)
                            throws RemoteException
Remove a registry change listener.

Parameters:
listener - the registry change listener to remove
Throws:
RemoteException - if a transport error occurs

flush

public void flush()
           throws IOException,
                  RemoteException
Request externalization of the registry state.

Throws:
IOException - if an I/O error occurs
RemoteException - if a transport error occurs