|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.extensions.webscripts.connector.AbstractConnector org.springframework.extensions.webscripts.connector.HttpConnector
public class HttpConnector
Basic Connector implementation that can be used to perform simple HTTP and HTTP communication with a remote endpoint. This connector supports basic HTTP authentication via the RemoteClient.
Field Summary |
---|
Fields inherited from class org.springframework.extensions.webscripts.connector.AbstractConnector |
---|
connectorSession, descriptor, endpoint |
Constructor Summary | |
---|---|
HttpConnector(RemoteConfigElement.ConnectorDescriptor descriptor,
String endpoint)
Instantiates a new http connector. |
Method Summary | |
---|---|
protected void |
applyRequestAuthentication(RemoteClient remoteClient,
ConnectorContext context)
Stamps Credentials values onto the remote client |
Response |
call(String uri,
ConnectorContext context)
Invokes a URI on a remote service. |
Response |
call(String uri,
ConnectorContext context,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Invokes a URI on a remote service and streams back results to the provided response object. |
Response |
call(String uri,
ConnectorContext context,
InputStream in)
Invokes a URI on a remote service, passing the input as supplied via a POST/PUT. |
Response |
call(String uri,
ConnectorContext context,
InputStream in,
OutputStream out)
Invokes a URI on a remote service. |
protected RemoteClient |
initRemoteClient(ConnectorContext context)
Init the RemoteClient object based on the Connector Context. |
protected void |
processResponse(RemoteClient remoteClient,
Response response)
Retrieves headers from response and stores back onto Credentials |
Methods inherited from class org.springframework.extensions.webscripts.connector.AbstractConnector |
---|
call, getConnectorSession, getCredentials, getEndpoint, setConnectorSession, setCredentials, setEndpoint, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HttpConnector(RemoteConfigElement.ConnectorDescriptor descriptor, String endpoint)
descriptor
- the descriptorendpoint
- the endpointMethod Detail |
---|
public Response call(String uri, ConnectorContext context)
Connector
uri
- the uricontext
- the context of the invoke
public Response call(String uri, ConnectorContext context, InputStream in)
Connector
uri
- the uricontext
- the context of the invokein
- the input stream
public Response call(String uri, ConnectorContext context, InputStream in, OutputStream out)
Connector
uri
- the uricontext
- the context of the invokein
- the input streamout
- the output stream
public Response call(String uri, ConnectorContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
Connector
uri
- the uricontext
- the context of the invokereq
- Request to proxy fromres
- Response to proxy onto
protected void applyRequestAuthentication(RemoteClient remoteClient, ConnectorContext context)
remoteClient
- protected void processResponse(RemoteClient remoteClient, Response response)
response
- protected RemoteClient initRemoteClient(ConnectorContext context)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |