public final class ConnectorContext extends Object
Invocation context consists of HTTP request state such as fixed parameters and headers and the HTTP request method.
| Constructor and Description |
|---|
ConnectorContext()
Instantiates a new connector context.
|
ConnectorContext(HttpMethod method)
Instantiates a new connector context.
|
ConnectorContext(HttpMethod method,
Map<String,String> parameters,
Map<String,String> headers)
Instantiates a new connector context.
|
ConnectorContext(Map<String,String> parameters,
Map<String,String> headers)
Instantiates a new connector context.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getCommitResponse() |
String |
getContentType()
Gets the content type.
|
boolean |
getExceptionOnError() |
Map<String,String> |
getHeaders()
Gets the headers.
|
HttpMethod |
getMethod()
Gets the method.
|
Map<String,String> |
getParameters()
Gets the parameters.
|
void |
setCommitResponseOnAuthenticationError(boolean commitResponse) |
void |
setContentType(String contentType)
Sets the content type.
|
void |
setExceptionOnError(boolean exceptionOnError) |
void |
setMethod(HttpMethod method)
Sets the method.
|
public ConnectorContext()
public ConnectorContext(Map<String,String> parameters, Map<String,String> headers)
parameters - the parametersheaders - the headerspublic ConnectorContext(HttpMethod method)
method - the HTTP methodpublic Map<String,String> getParameters()
public String getContentType()
public void setContentType(String contentType)
contentType - the new content typepublic HttpMethod getMethod()
public void setMethod(HttpMethod method)
method - the new methodpublic boolean getCommitResponse()
public void setCommitResponseOnAuthenticationError(boolean commitResponse)
commitResponse - true to commit the response if a 401 error is returned, false otherwise.
Allows for retry of connections that stream to a remote connection after an authentication pass.public void setExceptionOnError(boolean exceptionOnError)
exceptionOnError - True to throw an exception on a server 500 response - else return 500 code
in the usual Response object. This is useful when internal services want to make a remote call but
are not interested in dealing with and returing exceptions directly to the user.public boolean getExceptionOnError()
Copyright © 2005–2018 Alfresco Software. All rights reserved.