public class LoadServiceProxy extends jade.core.SliceProxy implements LoadServiceSlice
LoadServiceSlice
.SERVICE_GET_AID_LIST, SERVICE_GET_AID_LIST_SENSOR, SERVICE_GET_AUTO_REMOTE_CONTAINER_CONFIG, SERVICE_GET_CONTAINER_DESCRIPTION, SERVICE_GET_LOCATION, SERVICE_GET_NEW_CONTAINER_2_WAIT_4_STATUS, SERVICE_MEASURE_LOAD, SERVICE_PUT_CONTAINER_DESCRIPTION, SERVICE_REQUEST_AVAILABLE_MACHINES, SERVICE_SET_AGENT_MIGRATION, SERVICE_SET_DEFAULTS_4_REMOTE_CONTAINER_CONFIG, SERVICE_SET_THRESHOLD_LEVEL, SERVICE_START_AGENT, SERVICE_START_NEW_REMOTE_CONTAINER, SERVICE_THREAD_MEASUREMENT_PUT, SERVICE_THREAD_MEASUREMENT_REQUEST
Constructor and Description |
---|
LoadServiceProxy() |
Modifier and Type | Method and Description |
---|---|
jade.core.AID[] |
getAIDList()
Gets the array of all available agents in a (remote) container.
|
jade.core.AID[] |
getAIDListSensorAgents()
Gets the array of all available agents in a (remote) container, which are connected to the SimulationService.
|
RemoteContainerConfig |
getAutoRemoteContainerConfig()
Provides the Default remote container configuration.
|
ClientRemoteContainerReply |
getCRCReply()
Gets the remotely available ClientRemoteContainerReply.
|
jade.core.Location |
getLocation()
Gets the Location of a container.
|
LoadInformation.Container2Wait4 |
getNewContainer2Wait4Status(java.lang.String containerName2Wait4)
Returns the current status of the requested new container.
|
void |
mainRequestAvailableMachines()
Main request available machines.
|
PlatformLoad |
measureLoad()
Will measure the load of a (remote) container.
|
void |
putContainerDescription(ClientRemoteContainerReply crcReply)
Sends a container description to the node.
|
void |
putThreadProtocol(ThreadProtocol threadProtocol)
Put thread protocol.
|
void |
requestThreadMeasurement(long timestamp)
Requests the thread measurement from the contacted container.
|
void |
setAgentMigration(java.util.Vector<LoadAgentMap.AID_Container> transferAgents)
Sets the Vector of agents, which have to migrate to a different container/location.
|
void |
setDefaults4RemoteContainerConfig(RemoteContainerConfig remoteConfig)
Sets the defaults for a remote container configuration.
|
void |
setThresholdLevels(LoadThresholdLevels thresholdLevels)
Sets the threshold levels at a remote container.
|
boolean |
startAgent(java.lang.String nickName,
java.lang.String agentClassName,
java.lang.Object[] args)
Start an agent.
|
java.lang.String |
startNewRemoteContainer(RemoteContainerConfig remoteConfig)
Start new remote container.
|
public boolean startAgent(java.lang.String nickName, java.lang.String agentClassName, java.lang.Object[] args) throws jade.core.IMTPException
LoadServiceSlice
startAgent
in interface LoadServiceSlice
nickName
- the local name of the agentagentClassName
- the agent classargs
- the serializable Object array of the start start argumentsjade.core.IMTPException
- the IMTPExceptionpublic java.lang.String startNewRemoteContainer(RemoteContainerConfig remoteConfig) throws jade.core.IMTPException
LoadServiceSlice
startNewRemoteContainer
in interface LoadServiceSlice
remoteConfig
- the RemoteContainerConfigjade.core.IMTPException
- the IMTPExceptionpublic void setDefaults4RemoteContainerConfig(RemoteContainerConfig remoteConfig) throws jade.core.IMTPException
LoadServiceSlice
setDefaults4RemoteContainerConfig
in interface LoadServiceSlice
remoteConfig
- the ontology instance for the default remote container configurationjade.core.IMTPException
- the iMTP exceptionpublic RemoteContainerConfig getAutoRemoteContainerConfig() throws jade.core.IMTPException
LoadServiceSlice
getAutoRemoteContainerConfig
in interface LoadServiceSlice
jade.core.IMTPException
- the IMTPExceptionpublic LoadInformation.Container2Wait4 getNewContainer2Wait4Status(java.lang.String containerName2Wait4) throws jade.core.IMTPException
LoadServiceSlice
getNewContainer2Wait4Status
in interface LoadServiceSlice
containerName2Wait4
- the new containers namejade.core.IMTPException
- the IMTPExceptionLoadInformation.Container2Wait4
public jade.core.Location getLocation() throws jade.core.IMTPException
LoadServiceSlice
getLocation
in interface LoadServiceSlice
jade.core.IMTPException
- the IMTPExceptionLocation
public void setThresholdLevels(LoadThresholdLevels thresholdLevels) throws jade.core.IMTPException
LoadServiceSlice
setThresholdLevels
in interface LoadServiceSlice
thresholdLevels
- the new threshold levelsjade.core.IMTPException
- the IMTPExceptionLoadThresholdLevels
public PlatformLoad measureLoad() throws jade.core.IMTPException
LoadServiceSlice
measureLoad
in interface LoadServiceSlice
jade.core.IMTPException
- the IMTPExceptionpublic jade.core.AID[] getAIDList() throws jade.core.IMTPException
LoadServiceSlice
getAIDList
in interface LoadServiceSlice
jade.core.IMTPException
- the IMTPExceptionpublic jade.core.AID[] getAIDListSensorAgents() throws jade.core.IMTPException
LoadServiceSlice
getAIDListSensorAgents
in interface LoadServiceSlice
jade.core.IMTPException
- the IMTPExceptionSimulationService
,
ServiceActuator
public void setAgentMigration(java.util.Vector<LoadAgentMap.AID_Container> transferAgents) throws jade.core.IMTPException
LoadServiceSlice
setAgentMigration
in interface LoadServiceSlice
transferAgents
- the new agent migrationjade.core.IMTPException
- the IMTPExceptionpublic void putContainerDescription(ClientRemoteContainerReply crcReply) throws jade.core.IMTPException
LoadServiceSlice
putContainerDescription
in interface LoadServiceSlice
crcReply
- the ClientRemoteContainerReplyjade.core.IMTPException
- the IMTPExceptionpublic ClientRemoteContainerReply getCRCReply() throws jade.core.IMTPException
LoadServiceSlice
getCRCReply
in interface LoadServiceSlice
jade.core.IMTPException
- the IMTPExceptionpublic void requestThreadMeasurement(long timestamp) throws jade.core.IMTPException
LoadServiceSlice
requestThreadMeasurement
in interface LoadServiceSlice
jade.core.IMTPException
- the IMTP exceptionpublic void putThreadProtocol(ThreadProtocol threadProtocol) throws jade.core.IMTPException
LoadServiceSlice
putThreadProtocol
in interface LoadServiceSlice
threadProtocol
- the thread protocoljade.core.IMTPException
- the IMTP exceptionpublic void mainRequestAvailableMachines() throws jade.core.IMTPException
LoadServiceSlice
mainRequestAvailableMachines
in interface LoadServiceSlice
jade.core.IMTPException
- the IMTP exception