public abstract class ConsoleSession extends Object implements ServiceFactory<Object>
The console session must be registered as an OSGi service in order to be associated with a console instance. The console implementation will discover any console session services and will create a new console instance using the console session for input and output. When a session is closed then the console session service will be unregistered and the console instance will terminate and be disposed of. The console instance will also terminate if the console session service is unregistered for any reason.
Constructor and Description |
---|
ConsoleSession() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Called by the console implementation to free resources associated
with this console session.
|
protected abstract void |
doClose()
Called by the
close() method to free resources associated
with this console session. |
abstract InputStream |
getInput()
Returns the input for this console session.
|
abstract OutputStream |
getOutput()
Returns the output for this console session.
|
Object |
getService(Bundle bundle,
ServiceRegistration<Object> registration) |
void |
ungetService(Bundle bundle,
ServiceRegistration<Object> registration,
Object service) |
public final void close()
protected abstract void doClose()
close()
method to free resources associated
with this console session. For example, closing the streams
associated with the input and output for this session.public abstract InputStream getInput()
public abstract OutputStream getOutput()
public final Object getService(Bundle bundle, ServiceRegistration<Object> registration)
getService
in interface ServiceFactory<Object>
public final void ungetService(Bundle bundle, ServiceRegistration<Object> registration, Object service)
ungetService
in interface ServiceFactory<Object>
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.