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 voidclose()Closes a given remoting session.voidcontrolExecution(ExecutionCommands aCommand)Call this method to control the test execution on the server.voidcreateBreakpoint(Integer anEntryReference)Creates a breakpoint at the specified entry reference.protected Map<Class<? extends AbstractMessage>,MessageProcessor<?>>createProcessors()Creates processors to process messages.voiddeleteBreakpoint(Integer anEntryReference)Deletes a breakpoint.ExecutionStatesgetExecutionState()booleanisActive()voidrequestExecutionStateUpdate()Requests an execution state update from the server.voidrequestShutdown()Requests an immediate shutdown.protected voidsendMessage(AbstractMessage aMessage)Sends a message to the server.voidsendTestTimeState(long aRealtimeOffset, long aRealtimeDecouplingTime, double aProgressionFactor)Sends a test time sync message.voidsendTestTimeSyncResult(TimeSyncResultMessage aResultMessage)Sends aTimeSyncResultMessage.voidsetupFork(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.voidunsetVariableValue(String aName)Unsets a variables' value on a fork.voidupdateVariableValue(String aName, Serializable aValue)Updates a variables' value on a fork.
-
-
-
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 IPaPort- the portaListener- the listeneraClassLoader- the classloader to use when deserializing objects- Throws:
UnknownHostExceptionIOException
-
-
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 masteraSetList- 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 nameaValue- 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 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 Map<Class<? extends AbstractMessage>,MessageProcessor<?>> createProcessors()
Creates processors to process messages.- Returns:
-
-