Package sg.dex.starfish.impl
Class AAgent
- java.lang.Object
-
- sg.dex.starfish.impl.AAgent
-
- All Implemented Interfaces:
Agent
- Direct Known Subclasses:
MemoryAgent
,RemoteAgent
,SquidAgent
public abstract class AAgent extends java.lang.Object implements Agent
Class representing an Agent in the Ocean Ecosystem Agents are addressed with a W3C DID- Version:
- 0.5
- Author:
- Mike
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>
getDDO()
Gets the DDO for the agentDID
getDID()
Gets the DID for an Agentjava.lang.String
getEndpoint(java.lang.String type)
Returns the serviceEndpoint for the specified service type.java.util.Map<java.lang.String,java.lang.Object>
refreshDDO()
Fetches the latest DDO from Universal Resolver if not cached-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface sg.dex.starfish.Agent
getAsset, getAsset, registerAsset, uploadAsset
-
-
-
-
Method Detail
-
getDDO
public java.util.Map<java.lang.String,java.lang.Object> getDDO()
Description copied from interface:Agent
Gets the DDO for the agent
-
refreshDDO
public java.util.Map<java.lang.String,java.lang.Object> refreshDDO()
Fetches the latest DDO from Universal Resolver if not cached- Returns:
- JSONObject
-
getEndpoint
public java.lang.String getEndpoint(java.lang.String type)
Returns the serviceEndpoint for the specified service type. Searched the agent's DDO for the appropriate service.- Parameters:
type
- The type of the service to find- Returns:
- The service endpoint, or null if not found
-
-