Class ScriptRemote
java.lang.Object
org.springframework.extensions.webscripts.ScriptRemote
Root-scope class that provides useful functions for working with endpoints,
connectors and credentials.
This class also implements methods from the Connector interface so as to allow application developers to use it straight away against the configured default endpoint.
- Author:
- muzquiano, Kevin Roast
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionInvoke a specific URI on the default endpointconnect()Constructs a remote connector to a default endpoint (if configured).Constructs a RemoteClient to a specific endpoint.getEndpointDescription(String endpointId) Returns the description of an endpointString[]Returns a list of the application endpoint idsgetEndpointName(String endpointId) Returns the name of an endpointgetEndpointURL(String endpointId) Returns the configured URL for the given endpointbooleanvoidsetConnectorProvider(ConnectorProvider connectorProvider) Sets the connector provider.voidsetConnectorService(ConnectorService connectorService) Sets the Connector Service.
-
Constructor Details
-
ScriptRemote
public ScriptRemote()
-
-
Method Details
-
setConnectorService
Sets the Connector Service.- Parameters:
connectorService- ConnectorService
-
setConnectorProvider
Sets the connector provider.- Parameters:
connectorProvider- ConnectorProvider
-
connect
Constructs a remote connector to a default endpoint (if configured). If a default endpoint is not configured, null will be returned.- Returns:
- the remote client
-
connect
Constructs a RemoteClient to a specific endpoint. If the endpoint does not exist, null is returned.- Parameters:
endpointId- the endpoint id- Returns:
- the remote client
-
call
Invoke a specific URI on the default endpoint- Parameters:
uri- the uri- Returns:
- the response
-
getEndpointIds
Returns a list of the application endpoint ids- Returns:
- String[]
-
getEndpointName
Returns the name of an endpoint- Parameters:
endpointId- String- Returns:
- String
-
getEndpointDescription
Returns the description of an endpoint- Parameters:
endpointId- String- Returns:
- String
-
isEndpointPersistent
-
getEndpointURL
Returns the configured URL for the given endpoint- Parameters:
endpointId- String- Returns:
- the endpoint url
-