|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.extensions.webscripts.ScriptRemoteConnector
public final class ScriptRemoteConnector
Describes a connector to a remote endpoint. This is a wrapper around the true connector object and it provides Script-style interfaces for working with buffered response strings and the like.
Constructor Summary | |
---|---|
ScriptRemoteConnector(Connector connector,
RemoteConfigElement.EndpointDescriptor descriptor)
Constructor |
Method Summary | |
---|---|
Response |
call(String uri)
Invokes a URI on the endpoint via a GET request. |
Response |
del(String uri)
Invokes a URI on a remote service as DELETE request. |
Response |
get(String uri)
Invokes a GET request URI on the endpoint. |
RemoteConfigElement.EndpointDescriptor |
getDescriptor()
|
String |
getEndpoint()
Returns the endpoint string |
Response |
post(String uri,
String body)
Invokes a URI on a remote service, passing the supplied body as a POST request. |
Response |
post(String uri,
String body,
String contentType)
Invokes a URI on a remote service, passing the supplied body as a POST request. |
Response |
put(String uri,
String body)
Invokes a URI on a remote service, passing the supplied body as a PUT request. |
Response |
put(String uri,
String body,
String contentType)
Invokes a URI on a remote service, passing the supplied body as a PUT request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ScriptRemoteConnector(Connector connector, RemoteConfigElement.EndpointDescriptor descriptor)
connector
- The Connector to wrapdescriptor
- The description of the endpoint this connector is managingMethod Detail |
---|
public Response call(String uri)
uri
- the uri
Response
public Response get(String uri)
uri
- the uri
Response
public Response post(String uri, String body)
uri
- Uri to call on the endpointbody
- Body of the POST request.
Response
public Response post(String uri, String body, String contentType)
uri
- Uri to call on the endpointbody
- Body of the POST request.contentType
- Content mimetype of the request body
Response
public Response put(String uri, String body)
uri
- Uri to call on the endpointbody
- Body of the PUT request.
Response
public Response put(String uri, String body, String contentType)
uri
- Uri to call on the endpointbody
- Body of the PUT request.contentType
- Content mimetype of the request
Response
public Response del(String uri)
uri
- Uri to call on the endpoint
Response
public String getEndpoint()
public RemoteConfigElement.EndpointDescriptor getDescriptor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |