Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.scxml
Class SCInstance

    java.lang.Object
      org.apache.commons.scxml.SCInstance

All Implemented Interfaces:
  Serializable

public class SCInstance
extends Object
implements Serializable

The `SCInstance` performs book-keeping functions for a particular execution of a state chart represented by a `SCXML` object.

See Also:
  Serialized Form

Method Summary
`Context` | `getContext(TransitionTarget transitionTarget)` Get the `Context` for this `TransitionTarget`.
`Evaluator` | `getEvaluator()` Get the `Evaluator`.
`SCXMLExecutor` | `getExecutor()` Get the `SCXMLExecutor` this instance is attached to.
`Invoker` | `getInvoker(TransitionTarget transitionTarget)` Get the `Invoker` for this `TransitionTarget`.
`Map` | `getInvokers()` Return the Map of `Invoker`s currently "active".
`Set` | `getLastConfiguration(History history)` Get the last configuration for this history.
`NotificationRegistry` | `getNotificationRegistry()` Get the notification registry.
`Context` | `getRootContext()` Get the root context.
`boolean` | `isDone(TransitionTarget transitionTarget)` Get the completion status for this composite `TransitionTarget`.
`boolean` | `isEmpty(History history)` Check whether we have prior history.
`Invoker` | `newInvoker(String targettype)` Get the `Invoker` for this `TransitionTarget`.
`void` | `reset(History history)` Resets the history state.
`void` | `setDone(TransitionTarget transitionTarget, boolean done)` Set the completion status for this composite `TransitionTarget`.
`void` | `setInvoker(TransitionTarget transitionTarget, Invoker invoker)` Set the `Invoker` for this `TransitionTarget`.
`void` | `setLastConfiguration(History history, Set lc)` Set the last configuration for this history.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getEvaluator

    public Evaluator getEvaluator()

  Get the `Evaluator`.

  Returns:
    The evaluator.

### getRootContext

    public Context getRootContext()

  Get the root context.

  Returns:
    The root context.

### getNotificationRegistry

    public NotificationRegistry getNotificationRegistry()

  Get the notification registry.

  Returns:
    The notification registry.

### getContext

    public Context getContext(TransitionTarget transitionTarget)

  Get the `Context` for this `TransitionTarget`. If one is not available it is created.

  Parameters:
    `transitionTarget` - The TransitionTarget.
  Returns:
    The Context.

### getLastConfiguration

    public Set getLastConfiguration(History history)

  Get the last configuration for this history.

  Parameters:
    `history` - The history.
  Returns:
    Returns the lastConfiguration.

### setLastConfiguration

    public void setLastConfiguration(History history,
                                     Set lc)

  Set the last configuration for this history.

  Parameters:
    `history` - The history.
    `lc` - The lastConfiguration to set.

### isEmpty

    public boolean isEmpty(History history)

  Check whether we have prior history.

  Parameters:
    `history` - The history.
  Returns:
    Whether we have a non-empty last configuration

### reset

    public void reset(History history)

  Resets the history state.

  Parameters:
    `history` - The history.
  See Also:
    `SCXMLExecutor.reset()`

### getExecutor

    public SCXMLExecutor getExecutor()

  Get the `SCXMLExecutor` this instance is attached to.

  Returns:
    The SCXMLExecutor this instance is attached to.
  See Also:
    `SCXMLExecutor`

### newInvoker

    public Invoker newInvoker(String targettype)
                       throws InvokerException

  Get the `Invoker` for this `TransitionTarget`. May return `null`. A non-null `Invoker` will be returned if and only if the `TransitionTarget` is currently active and contains an <invoke> child.

  Parameters:
    `targettype` - The type of the target being invoked.
  Returns:
    An `Invoker` for the specified type, if an invoker class is registered against that type, `null` otherwise.
  Throws:
    `InvokerException` - When a suitable `Invoker` cannot be instantiated.

### getInvoker

    public Invoker getInvoker(TransitionTarget transitionTarget)

  Get the `Invoker` for this `TransitionTarget`. May return `null`. A non-null `Invoker` will be returned if and only if the `TransitionTarget` is currently active and contains an <invoke> child.

  Parameters:
    `transitionTarget` - The `TransitionTarget`.
  Returns:
    The Invoker.

### setInvoker

    public void setInvoker(TransitionTarget transitionTarget,
                           Invoker invoker)

  Set the `Invoker` for this `TransitionTarget`.

  Parameters:
    `transitionTarget` - The TransitionTarget.
    `invoker` - The Invoker.

### getInvokers

    public Map getInvokers()

  Return the Map of `Invoker`s currently "active".

  Returns:
    The map of invokers.

### isDone

    public boolean isDone(TransitionTarget transitionTarget)

  Get the completion status for this composite `TransitionTarget`.

  Parameters:
    `transitionTarget` - The `TransitionTarget`.
  Returns:
    The completion status.
  Since:
    0.7

### setDone

    public void setDone(TransitionTarget transitionTarget,
                        boolean done)

  Set the completion status for this composite `TransitionTarget`.

  Parameters:
    `transitionTarget` - The TransitionTarget.
    `done` - The completion status.
  Since:
    0.7

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005-2007 The Apache Software Foundation. All Rights Reserved.