|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.parabon.client.SessionManager
com.parabon.client.RemoteSessionManager
com.parabon.client.SimulatorSessionManager
public class SimulatorSessionManager
The SimulatorSessionManager is a substitute for a RemoteSessionManager to facilitate local job execution in an environment meant to simulate remote execution. It will accumulate the tasks and elements for dispatch to local engines. Jobs run under Eclipse should call SessionManager.getInstance() to retrieve an instance that will point either to this instance or a RemoteSessionManager depending on the runtime launch preferences.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.parabon.client.RemoteSessionManager |
|---|
RemoteSessionManager.Establisher, RemoteSessionManager.GenericMessageConsumerTarget, RemoteSessionManager.MessageTransportRunnable |
| Field Summary | |
|---|---|
static java.lang.String |
WRITE_XML_STATUS_PROPERTY
|
| Fields inherited from class com.parabon.client.SessionManager |
|---|
DEFAULT_SESSION_MANAGER, destroyed, idGenerator, jobs, LOCAL_SESSION_MANAGER, log, pool, REMOTE_SESSION_MANAGER, SESSION_MODE_PROPERTY, SIMULATOR_SESSION_MANAGER, tempListenerList |
| Constructor Summary | |
|---|---|
SimulatorSessionManager()
|
|
| Method Summary | |
|---|---|
Job |
createJob(java.util.Map<java.lang.String,java.lang.String> attributes)
Create and add a new Job with the given attributes. |
void |
destroy(int blockMillis)
Close this session, and release any resources associated with it. |
protected void |
establishConnection(int blockMillis)
|
protected java.net.URI |
getBaseClientURI()
|
java.net.URI |
getGlobalDataURI()
|
protected com.parabon.server.common.MessageManagerInterface |
getMessageManager()
Get internal message manager. |
protected java.lang.String |
getNewJobID()
|
protected com.parabon.client.SimulatorSessionManager.Persistence |
getPersistence()
|
protected java.lang.String |
getSessionID()
|
java.util.Set<com.parabon.message.sp.TaskStatusMessage> |
getTaskStatusMessages(java.lang.String jobId)
|
protected int |
initJobID()
Read the next job id from disk |
protected void |
initTransport(java.lang.String clientServletUrl,
java.lang.String elementServletUrl)
Initialize Seneca Transport |
void |
reestablish(com.parabon.util.Listener completionListener)
Attempt to retrieve the latest list of jobs from the Frontier server, returning immediately without waiting for the operation to complete. |
protected void |
removeJob(Job job)
Remove job from job queue. |
protected java.lang.String |
sendData(com.parabon.io.DataWrapper data)
|
protected int |
sendMessage(com.parabon.message.Message m,
boolean barrier,
com.parabon.util.IntegerSet dependencies)
Intercept the Message before it is sent and react accordingly. |
java.lang.String |
toString()
|
| Methods inherited from class com.parabon.client.SessionManager |
|---|
addElement, addElement, addElement, addElement, getClientDataURI, getInstance, getInstance, getJobDataURI, getJobs, getLog, getTaskDataURI, notifyTaskEventListeners, reestablish |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String WRITE_XML_STATUS_PROPERTY
| Constructor Detail |
|---|
public SimulatorSessionManager()
throws ServerCommunicationException
ServerCommunicationException| Method Detail |
|---|
public java.net.URI getGlobalDataURI()
throws java.net.URISyntaxException
getGlobalDataURI in class RemoteSessionManagerjava.net.URISyntaxException
protected java.net.URI getBaseClientURI()
throws java.net.URISyntaxException
getBaseClientURI in class RemoteSessionManagerjava.net.URISyntaxExceptionpublic Job createJob(java.util.Map<java.lang.String,java.lang.String> attributes)
SessionManagercreateJob
returns without affecting the newly-created job.
createJob in class RemoteSessionManagerprotected void removeJob(Job job)
removeJob in class RemoteSessionManagerpublic void reestablish(com.parabon.util.Listener completionListener)
SessionManagercompletionListener.alert(nul) will be called when
reestablishment is complete.
reestablish in class RemoteSessionManagerpublic void destroy(int blockMillis)
SessionManager
Blocks at most approximately blockMillis milliseconds
(or indefinitely if blockMillis == -1) for destruction to
complete successfully; otherwise continues destruction but returns from
the method call if possible while destruction continues.
Note that this version of destroy() should not be called
from within a listener, as this could create a deadlock situation.
If a relatively short timeout is given, and this routine exits before
interactions are complete, threads may continue attempting to complete
various interactions in the background. If the application
subsequently exits the JVM (e.g. via System.exit()),
these interactions may not complete successfully -- for example,
messages may not be correctly and complete transferred to the Frontier
server, and hence operations initiated with this
SessionManager (such as job or task creation or removal)
may not occur.
destroy in class RemoteSessionManagerpublic java.lang.String toString()
toString in class RemoteSessionManager
protected void establishConnection(int blockMillis)
throws ServerCommunicationException
establishConnection in class RemoteSessionManagerServerCommunicationExceptionprotected java.lang.String sendData(com.parabon.io.DataWrapper data)
protected int sendMessage(com.parabon.message.Message m,
boolean barrier,
com.parabon.util.IntegerSet dependencies)
sendMessage in class RemoteSessionManagerprotected int initJobID()
initJobID in class RemoteSessionManagerprotected java.lang.String getNewJobID()
getNewJobID in class RemoteSessionManagerprotected java.lang.String getSessionID()
getSessionID in class RemoteSessionManagerpublic java.util.Set<com.parabon.message.sp.TaskStatusMessage> getTaskStatusMessages(java.lang.String jobId)
protected void initTransport(java.lang.String clientServletUrl,
java.lang.String elementServletUrl)
throws ServerCommunicationException
ServerCommunicationExceptionprotected com.parabon.server.common.MessageManagerInterface getMessageManager()
protected com.parabon.client.SimulatorSessionManager.Persistence getPersistence()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||