net.dpml.metro
Interface PartsManager

All Known Subinterfaces:
ContextHandlerCollection.Parts, HandlerCollection.Parts, Server.Parts

public interface PartsManager

Local interface through which a component implementation may interact with subsidary parts.

Version:
1.0.1
Author:
Digital Product Meta Library

Method Summary
 void commission()
          Initiate the oprdered activation of all internal parts.
 void decommission()
          Initiate deactivation of all internal parts.
 ComponentHandler getComponentHandler(String key)
          Return a local component handler.
 ComponentHandler[] getComponentHandlers()
          Return an array of all component handlers.
 ComponentHandler[] getComponentHandlers(Class service)
          Return an array of component handlers assignable to the supplied service.
 String[] getKeys()
          Return the array of keys used to identify internal parts.
 boolean isCommissioned()
          Return the commissioned state of the part collection.
 

Method Detail

getKeys

public String[] getKeys()
Return the array of keys used to identify internal parts.

Returns:
the part key array

getComponentHandler

public ComponentHandler getComponentHandler(String key)
                                     throws UnknownKeyException
Return a local component handler.

Parameters:
key - the internal part key
Returns:
the local component handler
Throws:
UnknownKeyException - the key is not recognized

getComponentHandlers

public ComponentHandler[] getComponentHandlers()
Return an array of all component handlers.

Returns:
the local component handler array

getComponentHandlers

public ComponentHandler[] getComponentHandlers(Class service)
Return an array of component handlers assignable to the supplied service.

Parameters:
service - the service class to match against
Returns:
the local component handler array

isCommissioned

public boolean isCommissioned()
Return the commissioned state of the part collection.

Returns:
true if commissioned else false

commission

public void commission()
                throws ControlException
Initiate the oprdered activation of all internal parts.

Throws:
ControlException - if an activation error occurs

decommission

public void decommission()
Initiate deactivation of all internal parts.