net.refractions.udig.catalog.ui.workflow
Class ConnectionErrorState
java.lang.Object
net.refractions.udig.catalog.ui.workflow.Workflow.State
net.refractions.udig.catalog.ui.workflow.ConnectionErrorState
public class ConnectionErrorState
- extends Workflow.State
Method Summary |
java.util.Map<IService,java.lang.Throwable> |
getErrors()
|
java.util.Map<IService,java.util.List<IConnectionErrorHandler>> |
getHandlers()
|
java.lang.String |
getName()
|
boolean |
hasNext()
Determines if the state can dynamically create a new state to be
the next active state of the workflow. |
void |
init(IProgressMonitor monitor)
Initialize the state. |
Workflow.State |
next()
The final method in the lifecycle of the state. |
boolean |
run(IProgressMonitor monitor)
Performs any "hard" work. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConnectionErrorState
public ConnectionErrorState(java.util.Map<IService,java.lang.Throwable> errors)
init
public void init(IProgressMonitor monitor)
throws java.io.IOException
- Description copied from class:
Workflow.State
- Initialize the state. This is the second method in the lifecycle of
the state. It is called after #setPrevious(). If the state needs to
"seed" itself with any context, that should occur here.
- Overrides:
init
in class Workflow.State
- Throws:
java.io.IOException
run
public boolean run(IProgressMonitor monitor)
throws java.io.IOException
- Description copied from class:
Workflow.State
- Performs any "hard" work. This method is provided is provided for
states which have to block to get work done. For instance, making
a connection to a remote service. This method returns a boolean
which signals wether the state was able to get the work done.
- Overrides:
run
in class Workflow.State
- Parameters:
monitor
- A progress monitor.
- Returns:
- True if the state was able to complete its job, otherwise
false.
- Throws:
java.io.IOException
hasNext
public boolean hasNext()
- Description copied from class:
Workflow.State
- Determines if the state can dynamically create a new state to be
the next active state of the workflow. Note, in most cases this is
equivalent to
next() != null
. However some
implemtnations require that next() be called only once, as it is a
lifecycle event.
- Overrides:
hasNext
in class Workflow.State
- Returns:
- true if the state can create a new state, otherwise false.
next
public Workflow.State next()
- Description copied from class:
Workflow.State
- The final method in the lifecycle of the state. This method is
used for states to dynamically link to each other. This method
returns null to indicate no state.
- Overrides:
next
in class Workflow.State
- Returns:
- A new state which is to become the next active state,
otherwise null.
getHandlers
public java.util.Map<IService,java.util.List<IConnectionErrorHandler>> getHandlers()
getErrors
public java.util.Map<IService,java.lang.Throwable> getErrors()
getName
public java.lang.String getName()
- Specified by:
getName
in class Workflow.State