BEAST
eu.baltrad.beast.exchange.json.HttpExchangeConnector Class Reference
Inheritance diagram for eu.baltrad.beast.exchange.json.HttpExchangeConnector:
eu.baltrad.beast.exchange.ExchangeConnector

Public Member Functions

 HttpExchangeConnector ()
 Default constructor.
 
RequestMapper getRequestMapper ()
 
void setRequestMapper (RequestMapper requestMapper)
 
ExchangeResponse send (String remoteAddress, AuthorizationRequest request)
 Sends the authorization request as a json message over http.
 
ExchangeResponse send (String remoteAddress, String json)
 Sends the authorization request as a json message over http.
 
ExchangeResponse sendDexStyle (String remoteAddress, AuthorizationRequest request)
 
ExchangeResponse send (SendFileRequest request)
 
ExchangeMessage parse (InputStream json)
 Parses a http key authorization request according to protocol version 2.2.
 
void setSecurityManager (ISecurityManager securityManager)
 

Protected Member Functions

ExchangeResponse createResponse (HttpResponse response)
 Creates an exchange response from a http response instance.
 
ByteArrayEntity createByteArrayEntity (byte[] arr)
 Creates a byte array entity for use in a http post.
 
boolean isRedirected (HttpResponse response)
 Checks if there is an indication that the http url has changed.
 
String getRedirectURL (HttpResponse response)
 Extracts the redirect URL from response if there is one, otherwise null.
 
HttpPost createPost (String url)
 Creates a HttpPost.
 
HttpClient createClient ()
 Creates a http client with the relevant http parameters set.
 
void shutdownClient (HttpClient httpClient)
 

Constructor & Destructor Documentation

◆ HttpExchangeConnector()

eu.baltrad.beast.exchange.json.HttpExchangeConnector.HttpExchangeConnector ( )
inline

Default constructor.

Member Function Documentation

◆ createByteArrayEntity()

ByteArrayEntity eu.baltrad.beast.exchange.json.HttpExchangeConnector.createByteArrayEntity ( byte[] arr)
inlineprotected

Creates a byte array entity for use in a http post.

Parameters
arrthe byte array to be wrapped in the byte array entity
Returns
the byte array entity

◆ createClient()

HttpClient eu.baltrad.beast.exchange.json.HttpExchangeConnector.createClient ( )
inlineprotected

Creates a http client with the relevant http parameters set.

Returns
the http client

◆ createPost()

HttpPost eu.baltrad.beast.exchange.json.HttpExchangeConnector.createPost ( String url)
inlineprotected

Creates a HttpPost.

Parameters
urlthe url that the post is for
Returns
the http post

◆ createResponse()

ExchangeResponse eu.baltrad.beast.exchange.json.HttpExchangeConnector.createResponse ( HttpResponse response)
inlineprotected

Creates an exchange response from a http response instance.

Parameters
responsethe http response
Returns
the exchange response

◆ getRedirectURL()

String eu.baltrad.beast.exchange.json.HttpExchangeConnector.getRedirectURL ( HttpResponse response)
inlineprotected

Extracts the redirect URL from response if there is one, otherwise null.

Parameters
responsethe response
Returns
the redirect URL if there is any

◆ getRequestMapper()

RequestMapper eu.baltrad.beast.exchange.json.HttpExchangeConnector.getRequestMapper ( )
inline
Returns
the request mapper

◆ isRedirected()

boolean eu.baltrad.beast.exchange.json.HttpExchangeConnector.isRedirected ( HttpResponse response)
inlineprotected

Checks if there is an indication that the http url has changed.

Parameters
responsethe response
Returns
true if there is an indication that address has been changed

◆ parse()

ExchangeMessage eu.baltrad.beast.exchange.json.HttpExchangeConnector.parse ( InputStream json)
inline

Parses a http key authorization request according to protocol version 2.2.

Parameters
requestthe http request
Returns
the parsed authorization request if parsable otherwise a HttpConnectorException will be thrown

Implements eu.baltrad.beast.exchange.ExchangeConnector.

◆ send() [1/3]

ExchangeResponse eu.baltrad.beast.exchange.json.HttpExchangeConnector.send ( SendFileRequest request)
inline

◆ send() [2/3]

ExchangeResponse eu.baltrad.beast.exchange.json.HttpExchangeConnector.send ( String remoteAddress,
AuthorizationRequest request )
inline

Sends the authorization request as a json message over http.

Parameters
request- the message
Returns
the status code

Implements eu.baltrad.beast.exchange.ExchangeConnector.

◆ send() [3/3]

ExchangeResponse eu.baltrad.beast.exchange.json.HttpExchangeConnector.send ( String remoteAddress,
String json )
inline

Sends the authorization request as a json message over http.

Parameters
remoteAddressthe remote address
jsonthe json string
Returns
the status code

◆ sendDexStyle()

ExchangeResponse eu.baltrad.beast.exchange.json.HttpExchangeConnector.sendDexStyle ( String remoteAddress,
AuthorizationRequest request )
inline

◆ setRequestMapper()

void eu.baltrad.beast.exchange.json.HttpExchangeConnector.setRequestMapper ( RequestMapper requestMapper)
inline
Parameters
requestMapperthe request mapper

◆ setSecurityManager()

void eu.baltrad.beast.exchange.json.HttpExchangeConnector.setSecurityManager ( ISecurityManager securityManager)
inline
Parameters
securityManagerthe security manager to be used

◆ shutdownClient()

void eu.baltrad.beast.exchange.json.HttpExchangeConnector.shutdownClient ( HttpClient httpClient)
inlineprotected
Parameters
httpClient

The documentation for this class was generated from the following file: