|
IBM Rational Performance Tester SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.rational.test.lt.recorder.core.extensibility.BaseClientDelegate
public abstract class BaseClientDelegate
A base implementation of IClientDelegate. This class provides basic convenience
methods and circuitry for implementing a client delegate. However it is not
required to extend this class in order to implement IClientDelegate.
Sub-classes are responsible of implementing IClientDelegate.start()
and IClientDelegate.stop()
,
may extend BaseClientDelegate.initialize(IClientContext)
, and should invoke BaseClientDelegate.sendStarted()
and BaseClientDelegate.sendStopped(boolean)
when appropriate.
Constructor Summary | |
---|---|
BaseClientDelegate()
|
Method Summary | |
---|---|
IClientContext |
getContext()
Returns the client context. |
Object |
getProperty(String name)
Gets a runtime property of the delegate. |
void |
initialize(IClientContext 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 |
postStop()
This implementation does nothing. |
boolean |
preStart()
This implementation does nothing. |
protected void |
sendStarted()
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ibm.rational.test.lt.recorder.core.extensibility.IClientDelegate |
---|
kill, start, stop |
Constructor Detail |
---|
public BaseClientDelegate()
Method Detail |
---|
public void initialize(IClientContext context) throws DelegateInitializeException
IClientDelegate.initialize(IClientContext)
.
initialize
in interface IClientDelegate
context
- The client context, that provides the client 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 final IClientContext getContext()
protected final void sendStarted()
IClientDelegate.start()
protected final void sendStopped(boolean failed)
IClientDelegate.stop()
public void messageReceived(Message message)
IRecordingComponentDelegate
messageReceived
in interface IRecordingComponentDelegate
message
- A message.public Object getProperty(String name) throws UnsupportedPropertyException
IRecordingComponentDelegate
getProperty
in interface IRecordingComponentDelegate
name
- The property name
UnsupportedPropertyException
- 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
IRecordingComponentDelegate
setProperty
in interface IRecordingComponentDelegate
name
- The property name
UnsupportedPropertyException
- 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 void sendUserMessage(String msg)
public boolean preStart()
preStart
in interface IClientDelegate
false
value indicates that an
error has occurred and the client can not start. It is up to the implementation to notify
any error using IRecordingComponentContext.getLog()
.IClientDelegate.postStop()
public void postStop()
postStop
in interface IClientDelegate
IClientDelegate.preStart()
|
IBM Rational Performance Tester SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |