public interface AmiEnabledInterface
This feature enables any class object to AMI instruments itself through the
COM.TIBCO.hawk.ami.AmiSession#addMethods(AmiEnabledInterface)
method.
For example, the AmiTrace object implments the
AmiEnabledInterface and its method getMethods()
returns an array of AmiMethodInterface objects related to get and set of
AmiTrace properties.
An example usage of the AmiTrace in conjunction with AmiSession would be:
String amiName = "COM.TIBCO.ami.test1";
String amiHelp = "An AMI Java test";
Transport rvTransport = null;
Queue rvQueue = null;
AmiTrace trace = null;
AmiSession ami = null;
// Initialize a trace object
trace = new AmiTrace();
trace.setLevel(trace.AMI_INFO | trace.AMI_WARNING);
rvTransport = new RvdTransport("7474", null, "tcp:7474");
rvQueue = new Queue();
// Initialize an AMI session object
ami = new AmiSession(rvTransport, rvQueue, amiName, amiHelp, trace);
// Perform other operations
. . .
// Enable the AmiMethodInterfaces implemented by the trace object
ami.addMethods(trace);
. . .
| Modifier and Type | Method and Description |
|---|---|
AmiMethodInterface[] |
getMethods()
Returns an array of AmiMethodInterface.
|
void |
setSession(AmiSession ami)
Sets the AmiSession object for the class implementing this interface.
|
void setSession(AmiSession ami) throws AmiException
ami - The current AmiSession object.
This method is invoked by AmiSession.addMethods before it
invokes the getMethods method. This is in case the
implementing class needs the current AmiSession object.
AmiExceptionAmiMethodInterface[] getMethods() throws AmiException
When an instance object of a class that implements this interface is
added to the AmiSession through addMethods,
this getMethods is invoked
AmiExceptionCopyright © 2000-2021 TIBCO Inc. All Rights Reserved.