org.crsh.shell.impl.command
Class InvocationContextImpl<C,P>
java.lang.Object
org.crsh.command.impl.BaseCommandContext
org.crsh.command.impl.BaseInvocationContext<C,P>
org.crsh.shell.impl.command.InvocationContextImpl<C,P>
- All Implemented Interfaces:
- CommandContext, InvocationContext<C,P>
class InvocationContextImpl<C,P>
- extends BaseInvocationContext<C,P>
- Version:
- $Revision$
- Author:
- Julien Viet
Method Summary |
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 class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
processContext
private final ShellProcessContext processContext
- .
InvocationContextImpl
public InvocationContextImpl(ShellProcessContext processContext,
Iterable<C> consumedItems,
Map<String,Object> session,
Map<String,Object> attributes)
getWidth
public int getWidth()
- Description copied from interface:
InvocationContext
- Returns the term width in chars. When the value is not positive it means
the value could not be determined.
- Returns:
- the term width
getProperty
public String getProperty(String propertyName)
- Description copied from interface:
InvocationContext
- Returns a generic property, usually this property is resolved by the
shell client.
- Parameters:
propertyName
- the property name
- Returns:
- the property value
readLine
public String readLine(String msg,
boolean echo)
- Description copied from interface:
InvocationContext
- 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 lineecho
- wether or not the line read should be echoed when typing
- Returns:
- the line read
Copyright © 2012 eXo Platform SAS. All Rights Reserved.