|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iids.aos.agent.Agent
org.iids.aos.webservices.wsgateway.WSGatewayAgentModule.WSGatewayAgent
public static class WSGatewayAgentModule.WSGatewayAgent
| Field Summary | |
|---|---|
static java.lang.String |
REGISTRATION_KEY
|
| Fields inherited from class org.iids.aos.agent.Agent |
|---|
log |
| Fields inherited from interface org.iids.aos.systemservices.WSGateway |
|---|
ERROR_COULD_NOT_PARSE_WSDL, ERROR_IO, ERROR_LEASE_EXPIRED, ERROR_MALFORMED_SOAP_REQUEST, ERROR_MALFORMED_URL, ERROR_NO_EXCLUSIVE_TRANSPORT, ERROR_UNKNOWN_PORT, WSGATEWAY_ADDRESS |
| Constructor Summary | |
|---|---|
WSGatewayAgentModule.WSGatewayAgent()
|
|
| Method Summary | |
|---|---|
protected void |
cleanUp()
User definable cleanup of the agent before stopping. |
void |
pingService()
|
void |
publishService(java.lang.String serviceName,
AgentHandle publisher,
java.lang.String className,
byte[] jar)
|
int |
requestWSDLAccess(java.lang.String wsdl,
java.lang.String serviceName,
java.lang.String serviceNameSpace,
java.lang.Boolean exclTransport,
AgentHandle handle)
Called by an agent server (on behalf of an agent) to request access to a web service specified by a WSDL document. |
void |
run()
To be implemented by the agent. |
java.lang.String |
sendSOAPRequest(java.lang.String request,
java.lang.String portName,
java.lang.Integer leaseID,
AgentHandle handle)
Called by an agent server (on behalf of an agent) to carry out a SOAP operation. |
void |
shutdown()
|
void |
unbind()
|
void |
unPublishService(java.lang.String serviceName)
|
| Methods inherited from class org.iids.aos.agent.Agent |
|---|
agentRunning, createAgentHandle, deregister, getAgentCPUtime, getAgentHandles, getApi, getArgs, getContext, getCurrentLocation, getLocations, getLocations, getLog, getOwnerHandle, getPrimaryHandle, getServlet, getServletNames, getToken, initAgent, kill, lookup, lookup, lookupPublished, lookupPublished, move, move, publish, publishServlet, receiveMessage, receiveMessage, receiveMessages, receiveMessages, register, removeAgentHandle, sendMessage, sendMessages, start, stopRunning, waitForCompletion |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String REGISTRATION_KEY
| Constructor Detail |
|---|
public WSGatewayAgentModule.WSGatewayAgent()
| Method Detail |
|---|
public void run()
Agent
Once this function finishes, the agent is done. This can be preceded
by a successful call to move(AgentScapeID)
if the agent should continue to
run on another location. If no successful move was done beforehand,
then the agent is removed from the location.
Note that it is assumed that, once an agent moved to another location, this method will finish soon afterwards. There is no protection against this (yet) however.
Any cleanup operations can be done by implementing Agent.cleanUp().
run in class Agentcleanup,
move
public int requestWSDLAccess(java.lang.String wsdl,
java.lang.String serviceName,
java.lang.String serviceNameSpace,
java.lang.Boolean exclTransport,
AgentHandle handle)
throws org.apache.xmlrpc.XmlRpcException
WSGatewaySOAP communicates over transport sessions whose protocols and contact points are specified in the WSDL document. (Typically these are HTTP sessions.) Some web services associate client state with the transport sessions. An agent may optionally specify that it requires the same transport sessions to be used consistently by this lease and that other leases (of other agents or of the same agent) cannot share the transport sessions.
requestWSDLAccess in interface WSGatewaywsdl - a URL pointing to a WSDL documentserviceName - the requested web service in the WSDL documentserviceNameSpace - the XML name space of serviceNameexclTransport - if true, the agent requires transport sessions to be maintained for the
duration of the lease, not to be shared by other leases, and to use at
most one transport session per web service porthandle - the agent identifier
org.apache.xmlrpc.XmlRpcException - containing one of: ERROR_MALFORMED_URL, ERROR_COULD_NOT_PARSE_WSDL,
ERROR_NO_EXCLUSIVE_TRANSPORT
public java.lang.String sendSOAPRequest(java.lang.String request,
java.lang.String portName,
java.lang.Integer leaseID,
AgentHandle handle)
throws org.apache.xmlrpc.XmlRpcException
WSGateway
sendSOAPRequest in interface WSGatewayrequest - a SOAP envelope containing the request,
including the name of the operationportName - port inside the web service that
contains the SOAP operationleaseID - a lease identifier returned by requestWSDLAccesshandle - the agent identifier, which must correspond to
the agent identifier passed to requestWSDLAccess
org.apache.xmlrpc.XmlRpcException - containing one of: ERROR_LEASE_EXPIRED, ERROR_UNKNOWN_PORT,
ERROR_MALFORMED_SOAP_REQUEST, ERROR_IO
public void publishService(java.lang.String serviceName,
AgentHandle publisher,
java.lang.String className,
byte[] jar)
throws WSGatewayException
publishService in interface WSGatewayWSGatewayException
public void unPublishService(java.lang.String serviceName)
throws WSGatewayException
unPublishService in interface WSGatewayWSGatewayExceptionpublic void unbind()
unbind in interface SystemService
public void shutdown()
throws java.lang.UnsupportedOperationException
shutdown in interface SystemServicejava.lang.UnsupportedOperationExceptionpublic void pingService()
pingService in interface SystemServiceprotected void cleanUp()
AgentAgent.stopRunning(), which is
called by AgentScape whenever the agent moves or is (being) killed.
An Agent-developer can override this method to perform any cleanup
necessary before the agent is stopped permanently, such as
stopping any threads this agent has created or removing any
windows that have been put on the screen.
This method may not throw any Exceptions.
cleanUp in class Agent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||