org.crsh.term.processor
Class Processor

java.lang.Object
  extended by org.crsh.term.processor.Processor
All Implemented Interfaces:
Runnable

public final class Processor
extends Object
implements Runnable

The processor is the glue between a term object and a shell object. It mainly read the input from the term and executes shell commands.

The class implements the Runnable interface to perform its processing.

Version:
$Revision$
Author:
Julien Viet

Field Summary
private  List<Closeable> listeners
          .
(package private)  org.slf4j.Logger log
          .
(package private)  ShellProcess process
          The current process being executed.
private  Shell shell
          .
private  AtomicReference<Status> status
          .
(package private)  Term term
          .
 
Constructor Summary
Processor(Term term, Shell shell)
           
 
Method Summary
 void addListener(Closeable listener)
           
 Result execute()
           
 State getState()
           
 boolean isAvailable()
           
 void run()
           
(package private)  void writePrompt()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

final org.slf4j.Logger log
.


term

final Term term
.


status

private final AtomicReference<Status> status
.


shell

private final Shell shell
.


process

volatile ShellProcess process
The current process being executed.


listeners

private final List<Closeable> listeners
.

Constructor Detail

Processor

public Processor(Term term,
                 Shell shell)
Method Detail

run

public void run()
Specified by:
run in interface Runnable

isAvailable

public boolean isAvailable()

getState

public State getState()

execute

public Result execute()

writePrompt

void writePrompt()

addListener

public void addListener(Closeable listener)


Copyright © 2012 eXo Platform SAS. All Rights Reserved.