Class IntegrityRemotingClient
- java.lang.Object
-
- de.gebit.integrity.remoting.client.IntegrityRemotingClient
-
public class IntegrityRemotingClient extends java.lang.Object
The remoting client.- Author:
- Rene Schneider - initial API and implementation
-
-
Constructor Summary
Constructors Constructor Description IntegrityRemotingClient(java.lang.String aHost, int aPort, IntegrityRemotingClientListener aListener, java.lang.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(java.lang.Integer anEntryReference)
Creates a breakpoint at the specified entry reference.protected java.util.Map<java.lang.Class<? extends AbstractMessage>,MessageProcessor<?>>
createProcessors()
Creates processors to process messages.void
deleteBreakpoint(java.lang.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 aTimeSyncResultMessage
.void
setupFork(java.util.List<? extends TestResourceProvider> someResourceProviders, SetList aSetList, java.util.Map<java.lang.String,java.lang.Object> someInitialVariables, int aNumberOfSuiteInvocations)
Sets up a new fork with the scripts to run and the current state of the setlist.void
unsetVariableValue(java.lang.String aName)
Unsets a variables' value on a fork.void
updateVariableValue(java.lang.String aName, java.io.Serializable aValue)
Updates a variables' value on a fork.
-
-
-
Constructor Detail
-
IntegrityRemotingClient
public IntegrityRemotingClient(java.lang.String aHost, int aPort, IntegrityRemotingClientListener aListener, java.lang.ClassLoader aClassLoader) throws java.net.UnknownHostException, java.io.IOException
Creates a new instance and connects to a given remoting host.- Parameters:
aHost
- the host name or IPaPort
- the portaListener
- the listeneraClassLoader
- the classloader to use when deserializing objects- Throws:
java.net.UnknownHostException
java.io.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(java.lang.Integer anEntryReference)
Creates a breakpoint at the specified entry reference.- Parameters:
anEntryReference
-
-
deleteBreakpoint
public void deleteBreakpoint(java.lang.Integer anEntryReference)
Deletes a breakpoint.- Parameters:
anEntryReference
- the entry at which the breakpoint shall be deleted
-
setupFork
public void setupFork(java.util.List<? extends TestResourceProvider> someResourceProviders, SetList aSetList, java.util.Map<java.lang.String,java.lang.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 masteraSetList
- the current set list of the master
-
updateVariableValue
public void updateVariableValue(java.lang.String aName, java.io.Serializable aValue)
Updates a variables' value on a fork.- Parameters:
aName
- the fully qualified variable nameaValue
- the new value
-
unsetVariableValue
public void unsetVariableValue(java.lang.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 timeaProgressionFactor
- 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 aTimeSyncResultMessage
.- Parameters:
anErrorMessage
-anExceptionStackTrace
-
-
sendMessage
protected void sendMessage(AbstractMessage aMessage)
Sends a message to the server.- Parameters:
aMessage
- the message to send
-
createProcessors
protected java.util.Map<java.lang.Class<? extends AbstractMessage>,MessageProcessor<?>> createProcessors()
Creates processors to process messages.- Returns:
-
-