org.jdiagnose.library.mock
Class MockRemoteSystem
java.lang.Object
org.jdiagnose.library.mock.MockRemoteSystem
- All Implemented Interfaces:
- org.jdiagnose.remote.system.RemoteSystem
- public class MockRemoteSystem
- extends java.lang.Object
- implements org.jdiagnose.remote.system.RemoteSystem
- Author:
- jmccrindle
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockRemoteSystem
public MockRemoteSystem()
createRandomFailingRemoteResult
protected org.jdiagnose.RemoteResult createRandomFailingRemoteResult(java.lang.String diagnostic,
java.lang.String agent,
java.lang.String host,
java.lang.String message)
createRandomSucceedingRemoteResult
protected org.jdiagnose.RemoteResult createRandomSucceedingRemoteResult(java.lang.String diagnostic,
java.lang.String agent,
java.lang.String host)
createRandomRemoteResult
protected org.jdiagnose.RemoteResult createRandomRemoteResult(java.lang.String diagnostic,
java.lang.String agent,
java.lang.String host,
boolean succeeded,
java.lang.String message)
init
public void init()
throws org.jdiagnose.remote.RemoteResultException
- Throws:
org.jdiagnose.remote.RemoteResultException
getAgent
public org.jdiagnose.remote.system.RemoteAgent getAgent(java.lang.String name)
- Specified by:
getAgent
in interface org.jdiagnose.remote.system.RemoteSystem
- Parameters:
name
-
- Returns:
getAgents
public java.util.Iterator getAgents()
- Specified by:
getAgents
in interface org.jdiagnose.remote.system.RemoteSystem
- Returns:
getHost
public org.jdiagnose.remote.system.RemoteHost getHost(java.lang.String name)
- Specified by:
getHost
in interface org.jdiagnose.remote.system.RemoteSystem
- Parameters:
name
-
- Returns:
getHosts
public java.util.Iterator getHosts()
- Specified by:
getHosts
in interface org.jdiagnose.remote.system.RemoteSystem
- Returns:
getResults
public java.util.Iterator getResults()
- Specified by:
getResults
in interface org.jdiagnose.remote.system.RemoteSystem
- Returns:
setMockDiagnostics
public void setMockDiagnostics(java.util.List diagnostics)
- Parameters:
diagnostics
- The diagnostics to set.
setMockAgents
public void setMockAgents(java.util.List agents)
setMockHosts
public void setMockHosts(java.util.List hosts)
setDomain
public void setDomain(java.lang.String domain)
- Parameters:
domain
- The domain to set.
setFailurePercentage
public void setFailurePercentage(int failurePercentage)
- Parameters:
failurePercentage
- The failurePercentage to set.
setGuidGenerator
public void setGuidGenerator(org.jdiagnose.remote.GuidGenerator guidGenerator)
- Parameters:
guidGenerator
- The guidGenerator to set.
setMaxResults
public void setMaxResults(int maxResults)
- Parameters:
maxResults
- The maxResults to set.
setMessages
public void setMessages(java.util.List messages)
- Parameters:
messages
- The messages to set.
setNextStartTime
public void setNextStartTime(long nextStartTime)
- Parameters:
nextStartTime
- The nextStartTime to set.
setRandom
public void setRandom(java.util.Random random)
- Parameters:
random
- The random to set.
setSystem
public void setSystem(org.jdiagnose.remote.system.InMemoryRemoteSystem system)
- Parameters:
system
- The system to set.
getResult
public org.jdiagnose.RemoteResult getResult(java.lang.String guid)
- Specified by:
getResult
in interface org.jdiagnose.remote.system.RemoteSystem
Copyright © 2004-2005 Grape Design Limited. All Rights Reserved.