|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iids.aos.agentserver.AgentScapeImpl
public class AgentScapeImpl
| Constructor Summary | |
|---|---|
AgentScapeImpl(AgentWrapper _agent,
AgentScapeConfig _config,
AsCommunicator _communicator,
MessageCenter _messageCenter,
AsLookupService _lookupService,
HostManagerWrapper _hostManagerWrapper,
AgentServer2WSGatewayModule _wsGatewayModule,
AgentNegotiationLib neglib,
AgentRunner agentRunner)
|
|
| Method Summary | |
|---|---|
AgreementOffer |
acceptLease(AgentScapeID locationID,
java.lang.String leaseIdentifier)
|
AgentHandle |
cloneAgent()
|
int |
createAgent(byte[] code)
|
int |
createAgent(byte[] code,
java.lang.String leaseIdentifier)
|
AgentHandle |
createAgentHandle()
|
AgentStore |
createStore(java.lang.String description,
byte[] data)
Create Agent store |
protected void |
finalize()
|
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)
Lets the agent issue a request to get migrated to another location. |
int |
move(AgentScapeID locationId,
java.lang.String leaseIdentifier)
Lets the agent issue a request to get migrated to another location. |
byte[] |
receiveMessage(boolean block)
|
byte[][] |
receiveMessages(boolean block)
|
long |
register(java.lang.String identifier,
java.lang.String key,
java.lang.String value,
float duration)
|
AgreementOffer |
requestLease(AgentScapeID locationID,
AgreementOffer leaseRequest)
|
AgreementOffer |
requestLeaseStatus(java.lang.String leaseIdentifier)
|
TemplateList |
requestTemplates(AgentScapeID locationID)
|
int |
requestWSDLAccess(java.lang.String wsdl,
java.lang.String serviceName,
java.lang.String serviceNameSpace,
boolean exclTransport)
Deprecated. |
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)
Deprecated. |
int |
suspend(long timeout)
Called by the agent if it wants to suspend |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AgentScapeImpl(AgentWrapper _agent,
AgentScapeConfig _config,
AsCommunicator _communicator,
MessageCenter _messageCenter,
AsLookupService _lookupService,
HostManagerWrapper _hostManagerWrapper,
AgentServer2WSGatewayModule _wsGatewayModule,
AgentNegotiationLib neglib,
AgentRunner agentRunner)
| Method Detail |
|---|
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable
public long register(java.lang.String identifier,
java.lang.String key,
java.lang.String value,
float duration)
register in interface AgentScapepublic java.util.Hashtable lookup(java.lang.String identifier)
lookup in interface AgentScape
public java.util.Hashtable find(java.lang.String key,
java.lang.String value)
find in interface AgentScapepublic java.util.Hashtable list(java.lang.String key)
list in interface AgentScape
public int createAgent(byte[] code)
throws java.lang.Exception
createAgent in interface AgentScapejava.lang.Exception
public int createAgent(byte[] code,
java.lang.String leaseIdentifier)
throws java.lang.Exception
createAgent in interface AgentScapejava.lang.Exceptionpublic AgentHandle cloneAgent()
cloneAgent in interface AgentScapepublic int suspend(long timeout)
suspend in interface AgentScapetimeout -
public void kill()
kill in interface AgentScape
public int move(AgentScapeID locationId,
java.lang.String leaseIdentifier)
move in interface AgentScapelocationId - leaseIdentifier -
public int move(AgentScapeID locationId)
move in interface AgentScapelocationId -
public void sendMessage(AgentHandle agentHandle,
byte[] message)
throws MessageBufferOverflowException
sendMessage in interface AgentScapeMessageBufferOverflowException
public void sendMessages(java.util.List<AgentHandle> ahs,
java.util.List<byte[]> messages)
throws MessageBufferOverflowException
sendMessages in interface AgentScapeMessageBufferOverflowExceptionpublic byte[] receiveMessage(boolean block)
receiveMessage in interface AgentScapepublic byte[][] receiveMessages(boolean block)
receiveMessages in interface AgentScapepublic AgentHandle getAgentHandle()
getAgentHandle in interface AgentScapepublic AgentHandle createAgentHandle()
createAgentHandle in interface AgentScapepublic AgentHandle getAgentHandle(java.net.URL locationService)
getAgentHandle in interface AgentScapepublic boolean isActive(AgentHandle agentHandle)
isActive in interface AgentScape
public boolean isLifeCycleState(AgentHandle agentHandle,
int type)
isLifeCycleState in interface AgentScapepublic AgentScapeID getLocationId()
getLocationId in interface AgentScapepublic java.net.URL getAgentServer()
getAgentServer in interface AgentScape
@Deprecated
public int requestWSDLAccess(java.lang.String wsdl,
java.lang.String serviceName,
java.lang.String serviceNameSpace,
boolean exclTransport)
throws java.net.MalformedURLException,
CouldNotParseWSDL,
NoExclusiveTransport
requestWSDLAccess in interface AgentScapejava.net.MalformedURLException
CouldNotParseWSDL
NoExclusiveTransportWSGateway
@Deprecated
public java.lang.String sendSOAPRequest(java.lang.String request,
java.lang.String portName,
int leaseID)
throws LeaseExpired,
UnknownPort,
MalformedSOAPRequest,
java.rmi.RemoteException
sendSOAPRequest in interface AgentScapeLeaseExpired
UnknownPort
MalformedSOAPRequest
java.rmi.RemoteExceptionWSGatewaypublic int getMyCPUtime()
getMyCPUtime in interface AgentScape
public TemplateList requestTemplates(AgentScapeID locationID)
throws NegotiationLibException
requestTemplates in interface AgentNegotiationLibInterfaceNegotiationLibException
public AgreementOffer requestLease(AgentScapeID locationID,
AgreementOffer leaseRequest)
throws NegotiationLibException
requestLease in interface AgentNegotiationLibInterfaceNegotiationLibException
public AgreementOffer acceptLease(AgentScapeID locationID,
java.lang.String leaseIdentifier)
throws NegotiationLibException
acceptLease in interface AgentNegotiationLibInterfaceNegotiationLibExceptionpublic AgreementOffer requestLeaseStatus(java.lang.String leaseIdentifier)
requestLeaseStatus in interface AgentNegotiationLibInterface
public AgentStore createStore(java.lang.String description,
byte[] data)
throws KernelException
AgentScapeAgent store
createStore in interface AgentScapedescription - Meta-data (description) of store.data - Data that will go in the store.
KernelException - if the AgentScape kernel cannot create
a storage segment for this agent.public AgentStore[] getStores(java.lang.String description)
AgentScape
getStores in interface AgentScapedescription - The store description to look for.
public AgentStore[] getStores()
AgentScape
getStores in interface AgentScape
public AgentStore getStore(int segmentID)
throws UnknownStoreIDException
AgentScape
getStore in interface AgentScapesegmentID - The kernel segment ID of this store.
UnknownStoreIDException - If there is no agent store in
the segment segmentID.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||