org.crsh
Interface InteractionContext<E>

All Superinterfaces:
Flushable, Pipe<E>
All Known Subinterfaces:
InvocationContext<P>, ShellProcessContext
All Known Implementing Classes:
ClientProcessContext, CRaSHInvocationContext, InnerInvocationContext, JLineProcessContext, ProcessContext

public interface InteractionContext<E>
extends Pipe<E>


Method Summary
 int getHeight()
          Returns the term height in chars.
 String getProperty(String propertyName)
          Returns a generic property, usually this property is resolved by the shell client.
 int getWidth()
          Returns the term width in chars.
 String readLine(String msg, boolean echo)
          Display a message and read a line on the console.
 
Methods inherited from interface org.crsh.Pipe
provide
 
Methods inherited from interface java.io.Flushable
flush
 

Method Detail

getWidth

int getWidth()
Returns the term width in chars. When the value is not positive it means the value could not be determined.

Returns:
the term width

getHeight

int getHeight()
Returns the term height in chars. When the value is not positive it means the value could not be determined.

Returns:
the term height

getProperty

String getProperty(String propertyName)
Returns a generic property, usually this property is resolved by the shell client.

Parameters:
propertyName - the property name
Returns:
the property value

readLine

String readLine(String msg,
                boolean echo)
Display a message and read a line on the console. If no line can be read then null is returned.

Parameters:
msg - the message to display before reading a line
echo - wether or not the line read should be echoed when typing
Returns:
the line read


Copyright © 2012 eXo Platform SAS. All Rights Reserved.