Package de.gebit.integrity.remoting.client

## Class IntegrityRemotingClient

- java.lang.Object
- - de.gebit.integrity.remoting.client.IntegrityRemotingClient

-     public class IntegrityRemotingClient
      extends Object

  The remoting client.
  Author:
    Rene Schneider - initial API and implementation

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `IntegrityRemotingClient​(String aHost, int aPort, IntegrityRemotingClientListener aListener, ClassLoader aClassLoader)` | Creates a new instance and connects to a given remoting host.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `close()` | Closes a given remoting session.
    `void` | `controlExecution​(ExecutionCommands aCommand)` | Call this method to control the test execution on the server.
    `void` | `createBreakpoint​(Integer anEntryReference)` | Creates a breakpoint at the specified entry reference.
    `protected Map<Class<? extends AbstractMessage>,​MessageProcessor<?>>` | `createProcessors()` | Creates processors to process messages.
    `void` | `deleteBreakpoint​(Integer anEntryReference)` | Deletes a breakpoint.
    `ExecutionStates` | `getExecutionState()` |
    `boolean` | `isActive()` |
    `void` | `requestExecutionStateUpdate()` | Requests an execution state update from the server.
    `void` | `requestShutdown()` | Requests an immediate shutdown.
    `protected void` | `sendMessage​(AbstractMessage aMessage)` | Sends a message to the server.
    `void` | `sendTestTimeState​(long aRealtimeOffset, long aRealtimeDecouplingTime, double aProgressionFactor)` | Sends a test time sync message.
    `void` | `sendTestTimeSyncResult​(TimeSyncResultMessage aResultMessage)` | Sends a `TimeSyncResultMessage`.
    `void` | `setupFork​(List<? extends TestResourceProvider> someResourceProviders, SetList aSetList, Map<String,​Object> someInitialVariables, int aNumberOfSuiteInvocations)` | Sets up a new fork with the scripts to run and the current state of the setlist.
    `void` | `unsetVariableValue​(String aName)` | Unsets a variables' value on a fork.
    `void` | `updateVariableValue​(String aName, Serializable aValue)` | Updates a variables' value on a fork.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### IntegrityRemotingClient

          public IntegrityRemotingClient​(String aHost,
                                         int aPort,
                                         IntegrityRemotingClientListener aListener,
                                         ClassLoader aClassLoader)
                                  throws UnknownHostException,
                                         IOException

      Creates a new instance and connects to a given remoting host.
      Parameters:
        `aHost` - the host name or IP
        `aPort` - the port
        `aListener` - the listener
        `aClassLoader` - the classloader to use when deserializing objects
      Throws:
        `UnknownHostException`
        `IOException`

  - ### Method Detail

    - #### close

          public void close()

      Closes a given remoting session.

    - #### isActive

          public boolean isActive()

    - #### controlExecution

          public void controlExecution​(ExecutionCommands aCommand)

      Call this method to control the test execution on the server.
      Parameters:
        `aCommand` - the command to execute

    - #### getExecutionState

          public ExecutionStates getExecutionState()

    - #### requestExecutionStateUpdate

          public void requestExecutionStateUpdate()

      Requests an execution state update from the server.

    - #### createBreakpoint

          public void createBreakpoint​(Integer anEntryReference)

      Creates a breakpoint at the specified entry reference.
      Parameters:
        `anEntryReference` -

    - #### deleteBreakpoint

          public void deleteBreakpoint​(Integer anEntryReference)

      Deletes a breakpoint.
      Parameters:
        `anEntryReference` - the entry at which the breakpoint shall be deleted

    - #### setupFork

          public void setupFork​(List<? extends TestResourceProvider> someResourceProviders,
                                SetList aSetList,
                                Map<String,​Object> someInitialVariables,
                                int aNumberOfSuiteInvocations)

      Sets up a new fork with the scripts to run and the current state of the setlist.
      Parameters:
        `someResourceProviders` - the test scripts currently loaded on the master
        `aSetList` - the current set list of the master

    - #### updateVariableValue

          public void updateVariableValue​(String aName,
                                          Serializable aValue)

      Updates a variables' value on a fork.
      Parameters:
        `aName` - the fully qualified variable name
        `aValue` - the new value

    - #### unsetVariableValue

          public void unsetVariableValue​(String aName)

      Unsets a variables' value on a fork.
      Parameters:
        `aName` - the fully qualified variable name

    - #### requestShutdown

          public void requestShutdown()

      Requests an immediate shutdown.

    - #### sendTestTimeState

          public void sendTestTimeState​(long aRealtimeOffset,
                                        long aRealtimeDecouplingTime,
                                        double aProgressionFactor)

      Sends a test time sync message.
      Parameters:
        `aRealtimeOffset` - the offset of our test time from real system time (wall clock)
        `aRealtimeDecouplingTime` - the point in real time at which our test time was decoupled from system time
        `aProgressionFactor` - the speed at which the test time should progress (1.0 is normal speed, progression factor may be negative too, or 0.0, which means time is frozen)

    - #### sendTestTimeSyncResult

          public void sendTestTimeSyncResult​(TimeSyncResultMessage aResultMessage)

      Sends a `TimeSyncResultMessage`.
      Parameters:
        `anErrorMessage` -
        `anExceptionStackTrace` -

    - #### sendMessage

          protected void sendMessage​(AbstractMessage aMessage)

      Sends a message to the server.
      Parameters:
        `aMessage` - the message to send

    - #### createProcessors

          protected Map<Class<? extends AbstractMessage>,​MessageProcessor<?>> createProcessors()

      Creates processors to process messages.
      Returns: