org.crsh.shell.impl.async
Class AsyncProcess

java.lang.Object
  extended by org.crsh.shell.impl.async.AsyncProcess
All Implemented Interfaces:
ShellProcess

public class AsyncProcess
extends Object
implements ShellProcess


Field Summary
private  ShellProcess callee
          .
private  ShellProcessContext caller
          .
private  ShellProcessContext context
          .
private  Object lock
          .
private  String request
          .
private  AsyncShell shell
          .
private  Status status
          .
 
Constructor Summary
AsyncProcess(AsyncShell shell, String request)
           
 
Method Summary
 void cancel()
          Signals the process it should be cancelled.
 void execute(ShellProcessContext processContext)
          Begin the process.
 Status getStatus()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

request

private final String request
.


caller

private ShellProcessContext caller
.


callee

private ShellProcess callee
.


shell

private AsyncShell shell
.


status

private Status status
.


lock

private final Object lock
.


context

private final ShellProcessContext context
.

Constructor Detail

AsyncProcess

AsyncProcess(AsyncShell shell,
             String request)
Method Detail

getStatus

public Status getStatus()

execute

public void execute(ShellProcessContext processContext)
Description copied from interface: ShellProcess
Begin the process. The client of this method should make no assumption whether the process is executed in a synchronous or asynchronous manner. The process will be termined when the process signals it with an invocation of the ShellProcessContext.end(ShellResponse) method.

Specified by:
execute in interface ShellProcess
Parameters:
processContext - the process context

cancel

public void cancel()
Description copied from interface: ShellProcess
Signals the process it should be cancelled.

Specified by:
cancel in interface ShellProcess


Copyright © 2014 eXo Platform SAS. All Rights Reserved.