public abstract class BaseRecorderDelegate extends Object implements IRecorderDelegate
IRecorderDelegate.start(boolean), IRecorderDelegate.stop(),
IRecorderDelegate.pause() and IRecorderDelegate.resume(); they may extend BaseRecorderDelegate.initialize(IRecorderContext),
and should invoke BaseRecorderDelegate.sendStarted(boolean), BaseRecorderDelegate.sendStopped(boolean), BaseRecorderDelegate.sendPaused() and
BaseRecorderDelegate.sendResumed() when appropriate.| Constructor and Description |
|---|
BaseRecorderDelegate() |
| Modifier and Type | Method and Description |
|---|---|
IRecorderContext |
getContext()
Returns the recorder context.
|
Object |
getProperty(String name)
Gets a runtime property of the delegate.
|
void |
initialize(IRecorderContext context)
This method may be overridden if desired, but the overriding method
should make sure that the super implementation is invoked.
|
void |
messageReceived(Message message)
This method is invoked by the context when a message is sent to this delegate.
|
void |
savePreference(String bundleId,
String preferenceName,
Object preferenceValue)
Let the framework save the specified preference.
|
protected void |
sendPaused() |
protected void |
sendResumed() |
protected void |
sendStarted(boolean recordingEnabled) |
protected void |
sendStopped(boolean failed) |
void |
sendUserMessage(String msg) |
void |
setProperty(String name,
Object value)
Sets the value of a runtime property of the delegate.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpause, resume, start, stoppublic void initialize(IRecorderContext context) throws DelegateInitializeException
IRecorderDelegate.initialize(IRecorderContext).initialize in interface IRecorderDelegatecontext - The recorder context, that provides the recorder configuration
that this instance should conform to, and a mechanism for the delegate
to send events to other involved components.DelegateInitializeException - If the delegate cannot be initialized or will not be able
to run properly.public IRecorderContext getContext()
protected final void sendStarted(boolean recordingEnabled)
recordingEnabled - Whether the recorder is recording or ignoring captured information.IRecorderDelegate.start(boolean)protected final void sendStopped(boolean failed)
IRecorderDelegate.stop()protected final void sendPaused()
IRecorderDelegate.pause()protected final void sendResumed()
IRecorderDelegate.resume()public void sendUserMessage(String msg)
public void messageReceived(Message message)
IRecordingComponentDelegatemessageReceived in interface IRecordingComponentDelegatemessage - A message.public Object getProperty(String name) throws UnsupportedPropertyException
IRecordingComponentDelegategetProperty in interface IRecordingComponentDelegatename - The property nameUnsupportedPropertyException - If the delegate does not support the property
(either because it does not define such a property, or because the property is read
at an inappropriate time).public void setProperty(String name, Object value) throws UnsupportedPropertyException
IRecordingComponentDelegatesetProperty in interface IRecordingComponentDelegatename - The property nameUnsupportedPropertyException - If the delegate does not support the property
(either because it does not define such a property, or because the property is set
at an inappropriate time).public final void savePreference(String bundleId, String preferenceName, Object preferenceValue)
bundleId - The bundle (or plug-in) id where the specified preference must be saved.preferenceName - The preference namepreferenceValue - The preference value. Must be one the following types: Boolean,
byte[], Double, Float, Integer, Long or String. Other types are not supported and will
be ignored.© Copyright IBM Corp. 2013. All rights reserved.