net.dpml.runtime
Interface Provider


public interface Provider

Component interface.

Version:
2.1.1
Author:
Digital Product Management Library

Method Summary
 void addStateListener(StateListener listener)
          Add a state change listener to the state machine.
<T> T
getInstance(Class<T> type)
          Return a fully commissioned instance.
 State getState()
          Return the current state of the instance.
 void removeStateListener(StateListener listener)
          Remove a state listener from the state machine.
 

Method Detail

addStateListener

void addStateListener(StateListener listener)
Add a state change listener to the state machine.

Parameters:
listener - the state listener

removeStateListener

void removeStateListener(StateListener listener)
Remove a state listener from the state machine.

Parameters:
listener - the state listener

getState

State getState()
Return the current state of the instance.

Returns:
the current state

getInstance

<T> T getInstance(Class<T> type)
Return a fully commissioned instance.

Parameters:
type - the instance return type
Returns:
the instance