org.iids.aos.agent
Interface AgentScape

All Superinterfaces:
AgentNegotiationLibInterface
All Known Implementing Classes:
AgentScapeImpl

public interface AgentScape
extends AgentNegotiationLibInterface

Author:
hidde@cs.vu.nl

Method Summary
 AgentHandle cloneAgent()
           
 int createAgent(byte[] agentCode)
           
 int createAgent(byte[] agentCode, java.lang.String leaseIdentifier)
           
 AgentHandle createAgentHandle()
           
 AgentStore createStore(java.lang.String description, byte[] data)
          Create Agent store
 java.util.Hashtable find(java.lang.String key, java.lang.String value)
           
 AgentHandle getAgentHandle()
           
 AgentHandle getAgentHandle(java.net.URL locationService)
           
 java.net.URL getAgentServer()
           
 AgentScapeID getLocationId()
           
 int getMyCPUtime()
           
 AgentStore getStore(int segmentID)
          Get agent store from segment (if possible).
 AgentStore[] getStores()
          Get all the stores of an agent.
 AgentStore[] getStores(java.lang.String description)
          Get all the stores of an agent with matching description.
 boolean isActive(AgentHandle agentHandle)
           
 boolean isLifeCycleState(AgentHandle agentHandle, int type)
           
 void kill()
           
 java.util.Hashtable list(java.lang.String key)
           
 java.util.Hashtable lookup(java.lang.String identifier)
           
 int move(AgentScapeID locationId)
           
 int move(AgentScapeID locationId, java.lang.String leaseIdentifier)
           
 byte[] receiveMessage(boolean block)
           
 byte[][] receiveMessages(boolean block)
           
 long register(java.lang.String identifier, java.lang.String key, java.lang.String value, float duration)
           
 int requestWSDLAccess(java.lang.String wsdl, java.lang.String serviceName, java.lang.String serviceNameSpace, boolean exclTransport)
           
 void sendMessage(AgentHandle agentHandle, byte[] message)
           
 void sendMessages(java.util.List<AgentHandle> ahs, java.util.List<byte[]> messages)
           
 java.lang.String sendSOAPRequest(java.lang.String request, java.lang.String portName, int leaseID)
           
 int suspend(long timeout)
           
 
Methods inherited from interface org.iids.aos.agent.AgentNegotiationLibInterface
acceptLease, requestLease, requestLeaseStatus, requestTemplates
 

Method Detail

register

long register(java.lang.String identifier,
              java.lang.String key,
              java.lang.String value,
              float duration)

lookup

java.util.Hashtable lookup(java.lang.String identifier)

find

java.util.Hashtable find(java.lang.String key,
                         java.lang.String value)

list

java.util.Hashtable list(java.lang.String key)

createAgent

int createAgent(byte[] agentCode,
                java.lang.String leaseIdentifier)
                throws java.lang.Exception
Throws:
java.lang.Exception

createAgent

int createAgent(byte[] agentCode)
                throws java.lang.Exception
Throws:
java.lang.Exception

cloneAgent

AgentHandle cloneAgent()

suspend

int suspend(long timeout)

kill

void kill()

move

int move(AgentScapeID locationId,
         java.lang.String leaseIdentifier)

move

int move(AgentScapeID locationId)

sendMessage

void sendMessage(AgentHandle agentHandle,
                 byte[] message)
                 throws MessageBufferOverflowException
Throws:
MessageBufferOverflowException

sendMessages

void sendMessages(java.util.List<AgentHandle> ahs,
                  java.util.List<byte[]> messages)
                  throws MessageBufferOverflowException
Throws:
MessageBufferOverflowException

receiveMessage

byte[] receiveMessage(boolean block)

receiveMessages

byte[][] receiveMessages(boolean block)

getAgentHandle

AgentHandle getAgentHandle()

createAgentHandle

AgentHandle createAgentHandle()

getAgentHandle

AgentHandle getAgentHandle(java.net.URL locationService)

isActive

boolean isActive(AgentHandle agentHandle)

isLifeCycleState

boolean isLifeCycleState(AgentHandle agentHandle,
                         int type)

getLocationId

AgentScapeID getLocationId()

getAgentServer

java.net.URL getAgentServer()

getMyCPUtime

int getMyCPUtime()

requestWSDLAccess

int requestWSDLAccess(java.lang.String wsdl,
                      java.lang.String serviceName,
                      java.lang.String serviceNameSpace,
                      boolean exclTransport)
                      throws java.net.MalformedURLException,
                             CouldNotParseWSDL,
                             NoExclusiveTransport
Throws:
java.net.MalformedURLException
CouldNotParseWSDL
NoExclusiveTransport
See Also:
WSGateway

sendSOAPRequest

java.lang.String sendSOAPRequest(java.lang.String request,
                                 java.lang.String portName,
                                 int leaseID)
                                 throws LeaseExpired,
                                        UnknownPort,
                                        MalformedSOAPRequest,
                                        java.rmi.RemoteException
Throws:
LeaseExpired
UnknownPort
MalformedSOAPRequest
java.rmi.RemoteException
See Also:
WSGateway

createStore

AgentStore createStore(java.lang.String description,
                       byte[] data)
                       throws KernelException
Create Agent store

Parameters:
description - Meta-data (description) of store.
data - Data that will go in the store.
Returns:
AgentStore handle that can be used for reading later.
Throws:
KernelException - if the AgentScape kernel cannot create a storage segment for this agent.

getStores

AgentStore[] getStores(java.lang.String description)
Get all the stores of an agent with matching description.

Parameters:
description - The store description to look for.
Returns:
an array with matching store handles.

getStores

AgentStore[] getStores()
Get all the stores of an agent.

Returns:
an array with all available store handles.

getStore

AgentStore getStore(int segmentID)
                    throws UnknownStoreIDException
Get agent store from segment (if possible).

Parameters:
segmentID - The kernel segment ID of this store.
Returns:
AgentStore handle to be used for reading etc.
Throws:
UnknownStoreIDException - If there is no agent store in the segment segmentID.


Copyright ? 2003, 2004 IIDS Group. All Rights Reserved.