org.crsh.shell.impl
Class InvocationContextImpl<C,P>

java.lang.Object
  extended by org.crsh.shell.impl.CommandContextImpl
      extended by org.crsh.shell.impl.AbstractInvocationContext<C,P>
          extended by org.crsh.shell.impl.InvocationContextImpl<C,P>
All Implemented Interfaces:
CommandContext, InvocationContext<C,P>

 class InvocationContextImpl<C,P>
extends AbstractInvocationContext<C,P>

Version:
$Revision$
Author:
Julien Viet

Field Summary
private  ShellProcessContext processContext
          .
 
Fields inherited from class org.crsh.shell.impl.AbstractInvocationContext
buffer, consumedItems, producedItems, writer
 
Constructor Summary
InvocationContextImpl(ShellProcessContext processContext, Iterable<C> consumedItems, Map<String,Object> attributes)
           
 
Method Summary
protected  Map<String,Object> attributes(Map<String,Object> attributes)
          Provide an opportunity to subclass to change the attribute map.
 String getProperty(String propertyName)
           
 int getWidth()
          Returns the term width in chars.
 String readLine(String msg, boolean echo)
           
 
Methods inherited from class org.crsh.shell.impl.AbstractInvocationContext
consume, getBuffer, getProducedItems, getWriter, isPiped, produce
 
Methods inherited from class org.crsh.shell.impl.CommandContextImpl
getAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.crsh.command.CommandContext
getAttributes
 

Field Detail

processContext

private final ShellProcessContext processContext
.

Constructor Detail

InvocationContextImpl

InvocationContextImpl(ShellProcessContext processContext,
                      Iterable<C> consumedItems,
                      Map<String,Object> attributes)
Method Detail

attributes

protected Map<String,Object> attributes(Map<String,Object> attributes)
Description copied from class: CommandContextImpl
Provide an opportunity to subclass to change the attribute map. This implementation returns the same object by default.

Overrides:
attributes in class AbstractInvocationContext<C,P>
Parameters:
attributes - the original attributes
Returns:
the replaced 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)

readLine

public String readLine(String msg,
                       boolean echo)


Copyright © 2011 eXo Platform SAS. All Rights Reserved.