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 booleanprotected final ThreadIOFields inherited from interface org.apache.felix.service.command.CommandProcessor
COMMAND_FUNCTION, COMMAND_SCOPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommand(String scope, Object target) voidaddCommand(String scope, Object target, Class<?> functions) voidaddCommand(String scope, Object target, Class<?> functions, int ranking) voidaddCommand(String scope, Object target, String function) voidaddCommand(String scope, Object target, String function, int ranking) addConstant(String name, Object target) voidvoidcreateSession(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) voidremoveCommand(Object target) voidremoveCommand(String scope, String function) voidremoveCommand(String scope, String function, Object target) removeConstant(String name) voidvoidvoidstop()
-
Field Details
-
converters
-
listeners
-
commands
-
constants
-
threadIO
-
sessions
-
stopped
protected boolean stopped
-
-
Constructor Details
-
CommandProcessorImpl
-
-
Method Details
-
createSession
Description copied from interface:CommandProcessorCreate 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:
createSessionin 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
-