BEAST
eu.baltrad.beast.exchange.ExchangeConnector Interface Reference

Interface that helps out when communicating with a remote node. More...

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

Public Member Functions

ExchangeResponse send (String remoteAddress, AuthorizationRequest request)
 Sends an authorization request to a remote host.
 
ExchangeResponse sendDexStyle (String remoteAddress, AuthorizationRequest request)
 Uses "OLD" style DEX for sending an authorization request to a remote node.
 
ExchangeResponse send (SendFileRequest request)
 Sends a file request to the remote node.
 
ExchangeMessage parse (InputStream json)
 Parses an input stream (most likely formatted as a json object) and translates it into an object within the exchange message.
 

Detailed Description

Interface that helps out when communicating with a remote node.

Author
anders

Member Function Documentation

◆ parse()

ExchangeMessage eu.baltrad.beast.exchange.ExchangeConnector.parse ( InputStream json)

Parses an input stream (most likely formatted as a json object) and translates it into an object within the exchange message.

Parameters
jsonthe input stream
Returns
the exchange message

Implemented in eu.baltrad.beast.exchange.json.HttpExchangeConnector.

◆ send() [1/2]

ExchangeResponse eu.baltrad.beast.exchange.ExchangeConnector.send ( SendFileRequest request)

Sends a file request to the remote node.

Uses "OLD" style DEX protocol which currently is the only available.

Parameters
requestthe request
Returns
the response

Implemented in eu.baltrad.beast.exchange.json.HttpExchangeConnector.

◆ send() [2/2]

ExchangeResponse eu.baltrad.beast.exchange.ExchangeConnector.send ( String remoteAddress,
AuthorizationRequest request )

Sends an authorization request to a remote host.

Parameters
remoteAddressthe remote address
requestthe request
Returns
a response

Implemented in eu.baltrad.beast.exchange.json.HttpExchangeConnector.

◆ sendDexStyle()

ExchangeResponse eu.baltrad.beast.exchange.ExchangeConnector.sendDexStyle ( String remoteAddress,
AuthorizationRequest request )

Uses "OLD" style DEX for sending an authorization request to a remote node.

If for example 404 is returned when using send(String, AuthorizationRequest) then a good idea can be to try this API. Note, since this is old style it is set to deprecated at creation.

Deprecated
Parameters
remoteAddressthe remote address
requestthe request
Returns
the response

Implemented in eu.baltrad.beast.exchange.json.HttpExchangeConnector.


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