CommandProcessorpublic class CommandProcessorImpl extends Object implements CommandProcessor
| Modifier and Type | Field | Description |
|---|---|---|
protected ConcurrentMap<String,Map<Object,Integer>> |
commands |
|
protected Map<String,Object> |
constants |
|
protected Set<Converter> |
converters |
|
protected Set<CommandSessionListener> |
listeners |
|
protected WeakHashMap<CommandSession,Object> |
sessions |
|
protected boolean |
stopped |
|
protected ThreadIO |
threadIO |
COMMAND_FUNCTION, COMMAND_SCOPE| Constructor | Description |
|---|---|
CommandProcessorImpl() |
|
CommandProcessorImpl(ThreadIO tio) |
protected final Set<CommandSessionListener> listeners
protected final ConcurrentMap<String,Map<Object,Integer>> commands
protected final ThreadIO threadIO
protected final WeakHashMap<CommandSession,Object> sessions
protected boolean stopped
public CommandProcessorImpl()
public CommandProcessorImpl(ThreadIO tio)
public CommandSessionImpl createSession(CommandSession parent)
createSession in interface CommandProcessorpublic CommandSessionImpl createSession(InputStream in, OutputStream out, OutputStream err)
CommandProcessorcreateSession in interface CommandProcessorin - The value used for System.inout - The stream used for System.outerr - The stream used for System.errpublic void stop()
public void addConverter(Converter c)
public void removeConverter(Converter c)
public void addListener(CommandSessionListener l)
public void removeListener(CommandSessionListener l)
public void removeCommand(Object target)
public Object convert(CommandSession session, Class<?> desiredType, Object in)
public Object eval(CommandSession session, Object[] argv) throws Exception
Exceptionpublic Object expr(CommandSessionImpl session, CharSequence expr)
public Object invoke(CommandSessionImpl session, Object target, String name, List<Object> args) throws Exception
Exceptionpublic Path redirect(CommandSessionImpl session, Path path, int mode)
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.