public abstract class AmiAsyncMethod extends AmiMethod implements AmiAsyncMethodInterface
AmiAsyncMethodInterface provided by this AMI Java API
implementation as a convenient abstract class of the
AmiAsyncMethodInterface.
User of this AmiAsyncMethod class must implement the following
abstract methods:
public abstract AmiParameterList getArguments();
public abstract AmiParameterList getReturns();
public abstract AmiParameterList onInvoke(AmiParameterList
arguments) throws AmiException;
public abstract void onStart(Integer context, AmiParameterList
args) throws AmiException;
public abstract void onStop(Integer context, AmiParameterList
args) throws AmiException;
| Constructor and Description |
|---|
AmiAsyncMethod(java.lang.String name,
java.lang.String help,
AmiMethodType type)
Constructor to create an asynchronous AMI method.
|
AmiAsyncMethod(java.lang.String name,
java.lang.String help,
AmiMethodType type,
int timeout)
Constructor to create an asynchronous AMI method.
|
AmiAsyncMethod(java.lang.String name,
java.lang.String help,
AmiMethodType type,
int timeout,
java.lang.String indexName)
Constructor to create an asynchronous AMI method.
|
AmiAsyncMethod(java.lang.String name,
java.lang.String help,
AmiMethodType type,
int timeout,
java.lang.String[] indexName)
Constructor to create an asynchronous AMI method.
|
AmiAsyncMethod(java.lang.String name,
java.lang.String help,
AmiMethodType type,
java.lang.String indexName)
Constructor to create an asynchronous AMI method.
|
AmiAsyncMethod(java.lang.String name,
java.lang.String help,
AmiMethodType type,
java.lang.String[] indexName)
Constructor to create an asynchronous AMI method.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onData()
Sends data to all the interesting subscribers
|
void |
onStart(AmiMethodContext context,
AmiParameterList args)
This method is invoked by the AMI Java API when an interest, or
subscription, on this asynchronous method arrives.
|
void |
onStop(AmiMethodContext context,
AmiParameterList args)
This method is invoked by the AMI Java API when the interest on this
asynchronous method no longer exists.
|
compareTo, equals, getArguments, getHelp, getIndexName, getName, getReturns, getSession, getTimeout, getType, onInvoke, setIndexName, setIndexName, setSession, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetArguments, getHelp, getIndexName, getName, getReturns, getSession, getTimeout, getType, onInvoke, setIndexName, setIndexName, setSessionpublic AmiAsyncMethod(java.lang.String name,
java.lang.String help,
AmiMethodType type)
name - Name of the methodhelp - Help text of the methodtype - Type of the method.
This constructor does not make any effort to perform input
argument validation. Validation is performed only at
AmiSession.addMethod.
For the method type parameter, use one of the following:
AmiConstants.METHOD_TYPE_INFO
AmiConstants.METHOD_TYPE_ACTION
AmiConstants.METHOD_TYPE_ACTION_INFO
public AmiAsyncMethod(java.lang.String name,
java.lang.String help,
AmiMethodType type,
int timeout)
name - Name of the methodhelp - Help text of the methodtype - Type of the method.
This constructor does not make any effort to perform input
argument validation. Validation is performed only at
AmiSession.addMethod.
For the method type parameter, use one of the following:
AmiConstants.METHOD_TYPE_INFO
AmiConstants.METHOD_TYPE_ACTION
AmiConstants.METHOD_TYPE_ACTION_INFO
public AmiAsyncMethod(java.lang.String name,
java.lang.String help,
AmiMethodType type,
java.lang.String indexName)
name - Name of the methodhelp - Help text of the methodtype - Type of the method.indexName - AMI method parameter name that serves as the index.
public AmiAsyncMethod(java.lang.String name,
java.lang.String help,
AmiMethodType type,
int timeout,
java.lang.String indexName)
name - Name of the methodhelp - Help text of the methodtype - Type of the method.timeout - Timeout of the method.indexName - AMI method parameter name that serves as the index.
public AmiAsyncMethod(java.lang.String name,
java.lang.String help,
AmiMethodType type,
java.lang.String[] indexName)
name - Name of the methodhelp - Help text of the methodtype - Type of the method.indexName - AMI method parameter name that serves as the index.
public AmiAsyncMethod(java.lang.String name,
java.lang.String help,
AmiMethodType type,
int timeout,
java.lang.String[] indexName)
name - Name of the methodhelp - Help text of the methodtype - Type of the method.timeout - Timeout of the method.indexName - AMI method parameter name that serves as the index.
public void onStart(AmiMethodContext context, AmiParameterList args) throws java.lang.Exception
onStart in interface AmiAsyncMethodInterfacecontext - The context associated with the subscription.args - The start subscription input arguments.java.lang.Exception - is thrown if incorrect data has been passed or the
AmiSession object was unable to send the data.
public void onStop(AmiMethodContext context, AmiParameterList args) throws java.lang.Exception
onStop in interface AmiAsyncMethodInterfacecontext - The context associated with the subscription.args - The stop subscription input arguments.java.lang.Exceptionpublic void onData()
throws AmiException
AmiException - is thrown if the the publication fails.
When data from an AMI asynchronous method becomes available, this method allows the application to publish the data.
Copyright © 2000-2021 TIBCO Inc. All Rights Reserved.