public interface MicroAgentServer
MicroAgentServer objects are used to interact with an agent's microagents.
Modifier and Type | Method and Description |
---|---|
MicroAgentDescriptor |
describe(MicroAgentID id)
This method may be used to retrieve a descriptor for a microagent.
|
MicroAgentID[] |
getMicroAgentIDs(java.lang.String name)
Queries the MicroAgentServer to learn the id of all microagents matching the
supplied name.
|
MicroAgentID[] |
getMicroAgentIDs(java.lang.String microAgentName,
int maxNum) |
MicroAgentID[] |
getMicroAgentIDs(java.lang.String agentName,
java.lang.String agentDns,
java.lang.String hawkDomain,
java.lang.String microAgentName,
int maxNum) |
MicroAgentData[] |
groupOp(MicroAgentID[] targets,
MethodInvocation mi) |
MicroAgentData |
invoke(MicroAgentID id,
MethodInvocation mi)
Performs a method invocation on a microagent.
|
void |
shutdown() |
Subscription |
subscribe(MicroAgentID id,
MethodSubscription msub,
SubscriptionHandler handler,
java.lang.Object handBack)
Registers a subscription with a microagent.
|
MicroAgentDescriptor describe(MicroAgentID id) throws MicroAgentException
id
- The microagent id of the microagent to describe.java.lang.IllegalArgumentException
- If the argument is null or empty stringMicroAgentException
- If a problem occurred servicing this requestMicroAgentData invoke(MicroAgentID id, MethodInvocation mi) throws MicroAgentException
The results of the invocation are delivered in the data field of the MicroAgentData return.
There are two general types of errors that can occur with method invocations:
Thus, a successful method invocation is one that doesn't throw an exception and does not deliver a MicroAgentException in the data field of its MicroAgentData return.
If the method invocation is successful, the data field of its MicroAgentData return will contain the method's return value or null if the method doesn't return a value.
You should not invoke to methods that are non-open (proprietary) unless you have supporting api and documentation. Doing so will have unpredictable results. Whether or not a method is open is defined by its MethodDescriptor
id
- The microagent id of the target microagent.mi
- The MethodInvocation object identifying the method to be invoked
and its arguments. May not be null.java.lang.IllegalArgumentException
- If the parameter conditions are violatedMicroAgentException
- If an error occurs during the delivery of a method invocation
to, or the results back from, a microagent.Subscription subscribe(MicroAgentID id, MethodSubscription msub, SubscriptionHandler handler, java.lang.Object handBack) throws MicroAgentException
Subscriptions are made against microagent methods. Registering a subscription is analogous to registering for events, where a microagent's method is the event source.
The subscribed to data is delivered asynchronously to the supplied SubscriptionHandler.
There are two general types of errors that can occur with method invocations:
id
- The microagent id of the target microagent.msub
- Identifies what is being subscribed to.handler
- The object that handles subscription results.handBack
- This Object parameter is accessable in the
resulting Subscription object which is delivered to
the handler along with subscription results.java.lang.IllegalArgumentException
- If the parameter conditions are violatedMicroAgentException
- If an error occurs during the registration of the subscription.MicroAgentID[] getMicroAgentIDs(java.lang.String name) throws MicroAgentException
Returns a list of MicroAgentID objects identifying all microagents, bearing that name, that were discovered to be running on all agents.
name
- The microagent name.MicroAgentException
- if an error occurs while satisfying the request.MicroAgentID[] getMicroAgentIDs(java.lang.String microAgentName, int maxNum) throws MicroAgentException
MicroAgentException
MicroAgentID[] getMicroAgentIDs(java.lang.String agentName, java.lang.String agentDns, java.lang.String hawkDomain, java.lang.String microAgentName, int maxNum) throws MicroAgentException
MicroAgentException
MicroAgentData[] groupOp(MicroAgentID[] targets, MethodInvocation mi) throws MicroAgentException
MicroAgentException
void shutdown()
Copyright © 2000-2019 TIBCO Inc. All Rights Reserved.