public class HttpConnector extends AbstractConnector
connectorSession, descriptor, endpoint| Constructor and Description |
|---|
HttpConnector(RemoteConfigElement.ConnectorDescriptor descriptor,
String endpoint)
Instantiates a new http connector.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyRequestAuthentication(RemoteClient remoteClient,
ConnectorContext context)
Stamps Credentials values onto the remote client
|
protected void |
applyRequestHeaders(RemoteClient remoteClient,
ConnectorContext context)
Stamps headers 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 cookie headers from response and stores back onto the Connector Session
|
buildRemoteClient, call, getConnectorSession, getCredentials, getEndpoint, setApplicationContext, setConnectorSession, setCredentials, setEndpoint, toStringpublic HttpConnector(RemoteConfigElement.ConnectorDescriptor descriptor, String endpoint)
descriptor - the descriptorendpoint - the endpointpublic Response call(String uri, ConnectorContext context)
Connectoruri - the uricontext - the context of the invokepublic Response call(String uri, ConnectorContext context, InputStream in)
Connectoruri - the uricontext - the context of the invokein - the input streampublic Response call(String uri, ConnectorContext context, InputStream in, OutputStream out)
Connectoruri - the uricontext - the context of the invokein - the input streamout - the output streampublic Response call(String uri, ConnectorContext context, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
Connectoruri - the uricontext - the context of the invokereq - Request to proxy fromres - Response to proxy ontoprotected void applyRequestHeaders(RemoteClient remoteClient, ConnectorContext context)
remoteClient - RemoteClientcontext - ConnectorContextprotected void applyRequestAuthentication(RemoteClient remoteClient, ConnectorContext context)
remoteClient - RemoteClientcontext - ConnectorContextprotected void processResponse(RemoteClient remoteClient, Response response)
remoteClient - RemoteClientresponse - Responseprotected RemoteClient initRemoteClient(ConnectorContext context)
Copyright © 2005–2015 Alfresco Software. All rights reserved.