Package org.glassfish.osgi.cli.remote
Class RemoteCommandSession
- java.lang.Object
-
- org.glassfish.osgi.cli.remote.RemoteCommandSession
-
public class RemoteCommandSession extends Object
This delegating class is used to overcome some limitations of theCommandSession
interface when it comes to session management.Once implementations are mature enough to not assume environmental behavior this class will become obsolete.
- Author:
- ancoron
-
-
Constructor Summary
Constructors Constructor Description RemoteCommandSession(org.apache.felix.service.command.CommandSession delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.felix.service.command.CommandSession
attach(InputStream in, PrintStream out, PrintStream err)
Attached the specified streams to the delegate of this instance and returns the modified delegate.void
detach()
Detaches all previously attached streams and hence, ensures that there are no stale references left.String
getId()
Get the identifier for this session, which is a UUID of type 4.
-
-
-
Method Detail
-
getId
public String getId()
Get the identifier for this session, which is a UUID of type 4.- Returns:
-
attach
public org.apache.felix.service.command.CommandSession attach(InputStream in, PrintStream out, PrintStream err)
Attached the specified streams to the delegate of this instance and returns the modified delegate.- Parameters:
in
- The "stdin" stream for the sessionout
- The "stdout" stream for the sessionerr
- The "stderr" stream for the session- Returns:
- The modified
CommandSession
delegate - See Also:
detach()
-
detach
public void detach()
Detaches all previously attached streams and hence, ensures that there are no stale references left.
-
-