Package org.apache.felix.gogo.runtime
Class CommandProcessorImpl
java.lang.Object
org.apache.felix.gogo.runtime.CommandProcessorImpl
- All Implemented Interfaces:
CommandProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ConcurrentMap
<String, Map<Object, Integer>> protected final Set
<CommandSessionListener> protected final WeakHashMap
<CommandSession, Object> protected boolean
protected final ThreadIO
Fields inherited from interface org.apache.felix.service.command.CommandProcessor
COMMAND_FUNCTION, COMMAND_SCOPE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCommand
(String scope, Object target) void
addCommand
(String scope, Object target, Class<?> functions) void
addCommand
(String scope, Object target, Class<?> functions, int ranking) void
addCommand
(String scope, Object target, String function) void
addCommand
(String scope, Object target, String function, int ranking) addConstant
(String name, Object target) void
void
createSession
(InputStream in, PrintStream out, PrintStream err) Create a new command session associated with IO streams.eval
(CommandSession session, Object[] argv) expr
(CommandSessionImpl session, CharSequence expr) void
removeCommand
(Object target) void
removeCommand
(String scope, String function) void
removeCommand
(String scope, String function, Object target) removeConstant
(String name) void
void
void
stop()
-
Field Details
-
converters
-
listeners
-
commands
-
constants
-
threadIO
-
sessions
-
stopped
protected boolean stopped
-
-
Constructor Details
-
CommandProcessorImpl
-
-
Method Details
-
createSession
Description copied from interface:CommandProcessor
Create a new command session associated with IO streams. The session is bound to the life cycle of the bundle getting this service. The session will be automatically closed when this bundle is stopped or the service is returned. The shell will provide any available commands to this session and can set additional variables.- Specified by:
createSession
in interfaceCommandProcessor
- Parameters:
in
- The value used for System.inout
- The stream used for System.outerr
- The stream used for System.err- Returns:
- A new session.
-
stop
public void stop() -
addConverter
-
removeConverter
-
addListener
-
removeListener
-
getCommands
-
addCommand
-
addCommand
-
addCommand
-
addConstant
-
removeConstant
-
addCommand
-
addCommand
-
removeCommand
-
removeCommand
-
removeCommand
-
convert
-
eval
- Throws:
Exception
-
expr
-