Package org.openremote.model.asset.agent
Interface AgentResource
@Path("agent")
public interface AgentResource
This resource is for Agent specific tasks like import and discovery; normal asset/attribute CRUD operations should
still use
AssetResource
.-
Method Summary
Modifier and TypeMethodDescriptiondoProtocolAssetDiscovery
(RequestParams requestParams, String agentId, String realm) DoAsset
discovery for the specifiedAgent
; the associatedProtocol
must implementProtocolAssetDiscovery
otherwise an empty set of results will be returned.doProtocolAssetImport
(RequestParams requestParams, String agentId, String realm, FileInfo fileInfo) DoAsset
import for the specifiedAgent
using the suppliedFileInfo
; the associatedProtocol
must implementProtocolAssetImport
otherwise an empty set of results will be returned.Agent<?,
?, ?>[] doProtocolInstanceDiscovery
(RequestParams requestParams, String parentId, String agentType, String realm) Do protocol instance (Agent
) discovery for the specified agent typeAgentDescriptor
; the associatedProtocol
must implementProtocolInstanceDiscovery
otherwise an empty set of results will be returned.
-
Method Details
-
doProtocolInstanceDiscovery
@GET @Path("instanceDiscovery/{agentType}") @Produces("application/json") @RolesAllowed("read:assets") Agent<?,?, doProtocolInstanceDiscovery?>[] (@BeanParam RequestParams requestParams, @QueryParam("parentId") String parentId, @PathParam("agentType") String agentType, @QueryParam("realm") String realm) Do protocol instance (Agent
) discovery for the specified agent typeAgentDescriptor
; the associatedProtocol
must implementProtocolInstanceDiscovery
otherwise an empty set of results will be returned. TheAsset
parent where theAgent
will be added should be specified so the backend can determine if theAgent
is being created on an Edge gateway instance or on this local instance.- Returns:
- A list of
Agent
s that can be created to create a connection to the discovered instance(s).
-
doProtocolAssetDiscovery
@GET @Path("assetDiscovery/{agentId}") @Consumes("application/json") @Produces("application/json") AssetTreeNode[] doProtocolAssetDiscovery(@BeanParam RequestParams requestParams, @PathParam("agentId") String agentId, @QueryParam("realm") String realm) DoAsset
discovery for the specifiedAgent
; the associatedProtocol
must implementProtocolAssetDiscovery
otherwise an empty set of results will be returned.Currently this request will automatically add the found
Asset
s to the system as children of the specifiedAgent
as well as returning them in the response. -
doProtocolAssetImport
@POST @Path("assetImport/{agentId}") @Consumes("application/json") @Produces("application/json") AssetTreeNode[] doProtocolAssetImport(@BeanParam RequestParams requestParams, @PathParam("agentId") String agentId, @QueryParam("realm") String realm, FileInfo fileInfo) DoAsset
import for the specifiedAgent
using the suppliedFileInfo
; the associatedProtocol
must implementProtocolAssetImport
otherwise an empty set of results will be returned.Currently this request will automatically add the found
Asset
s to the system as children of the specifiedAgent
as well as returning them in the response. NOTE: TheFileInfo
must be a file that the protocol understands.
-