|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread edu.sdsc.inca.ConsumerTest.MockAgent
public static class ConsumerTest.MockAgent
Use to emulate a real agent. Can be customized to serve a specific resources file from the GETCONFIG command with a certain amount of delay.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
boolean |
isReady
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ConsumerTest.MockAgent(int numConnections,
int port)
Create a new mock agent. |
Method Summary | |
---|---|
java.lang.String |
getUri()
Return the uri of the mock agent |
void |
run()
Functionality of mock server. |
void |
setDelay(int delay)
Set an artifical delay in the return of the GETCONFIG request. |
void |
setResourceConfig(edu.sdsc.inca.dataModel.resourceConfig.ResourceConfig resourceConfig)
Set the resources that should be returned in the Inca configuration XML in response to GETCONFIG command. |
void |
setSuites(java.lang.String[] suites)
Set the suites that should be returned in the Inca configuration XML in response to GETCONFIG command. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public boolean isReady
Constructor Detail |
---|
public ConsumerTest.MockAgent(int numConnections, int port)
numConnections
- The number of connections we expect to receive.port
- The port to start the mock depot on.Method Detail |
---|
public java.lang.String getUri()
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public void setDelay(int delay)
delay
- The number of milliseconds to wait before returning the
Inca configuration document.public void setResourceConfig(edu.sdsc.inca.dataModel.resourceConfig.ResourceConfig resourceConfig)
resourceConfig
- The resources to return to the agent client.public void setSuites(java.lang.String[] suites)
suites
- The suites to return to the agent client.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |