BaltradDex
BALTRAD Data Exchange System
Loading...
Searching...
No Matches
eu.baltrad.dex.net.protocol.impl.ProtocolVersionResponseWriter Class Reference
Inheritance diagram for eu.baltrad.dex.net.protocol.impl.ProtocolVersionResponseWriter:
eu.baltrad.dex.net.protocol.ResponseWriter

Public Member Functions

 ProtocolVersionResponseWriter (HttpServletResponse response, String responseVersion, String supportedVersion)
 
void userAccountResponse (String localNodeName, User user, int status) throws IOException
 
void dataSourcesResponse (String localNodeName, Set< DataSource > dataSources, int status) throws IOException
 
void dataSourcesResponse (String localNodeName, List< DataSource > dataSources, int status) throws IOException
 
void subscriptionResponse (String localNodeName, List< Subscription > subscriptions, int status) throws IOException
 
void messageResponse (String message, int status)
 
void statusResponse (int status)
 

Protected Member Functions

HttpServletResponseWrapper createResponseWrapper (HttpServletResponse response)
 
Set< DataSourcedsListToSet (List< DataSource > dataSources)
 
PrintWriter createPrintWriter (HttpServletResponseWrapper wrapper) throws IOException
 
JsonProtocol getJsonProtocol (String version)
 

Detailed Description

Author
Anders Henja

Constructor & Destructor Documentation

◆ ProtocolVersionResponseWriter()

eu.baltrad.dex.net.protocol.impl.ProtocolVersionResponseWriter.ProtocolVersionResponseWriter ( HttpServletResponse response,
String responseVersion,
String supportedVersion )
inline

Constructor

Parameters
responsethe http response
responseVersionthe version to be used in the response
supportedVersionwhat version we want to use

Member Function Documentation

◆ createPrintWriter()

PrintWriter eu.baltrad.dex.net.protocol.impl.ProtocolVersionResponseWriter.createPrintWriter ( HttpServletResponseWrapper wrapper) throws IOException
inlineprotected

Creates the print wrapper

Parameters
wrapperthe wrapper around the servlet response
Returns
the print writer
Exceptions
IOExceptionupon error

◆ createResponseWrapper()

HttpServletResponseWrapper eu.baltrad.dex.net.protocol.impl.ProtocolVersionResponseWriter.createResponseWrapper ( HttpServletResponse response)
inlineprotected

Creates a http response wrapper.

Parameters
responsethe response to wrap
Returns
the wrapped response

◆ dataSourcesResponse() [1/2]

void eu.baltrad.dex.net.protocol.impl.ProtocolVersionResponseWriter.dataSourcesResponse ( String localNodeName,
List< DataSource > dataSources,
int status ) throws IOException
inline

◆ dataSourcesResponse() [2/2]

void eu.baltrad.dex.net.protocol.impl.ProtocolVersionResponseWriter.dataSourcesResponse ( String localNodeName,
Set< DataSource > dataSources,
int status ) throws IOException
inline

◆ dsListToSet()

Set< DataSource > eu.baltrad.dex.net.protocol.impl.ProtocolVersionResponseWriter.dsListToSet ( List< DataSource > dataSources)
inlineprotected

Creates a set from a list

Parameters
dataSourcesthe list to convert
Returns
the converted set

◆ getJsonProtocol()

JsonProtocol eu.baltrad.dex.net.protocol.impl.ProtocolVersionResponseWriter.getJsonProtocol ( String version)
inlineprotected

Returns a json protocol suitable for provided version

Parameters
versionthe version
Returns
the json protocol

◆ messageResponse()

void eu.baltrad.dex.net.protocol.impl.ProtocolVersionResponseWriter.messageResponse ( String message,
int status )
inline

◆ statusResponse()

void eu.baltrad.dex.net.protocol.impl.ProtocolVersionResponseWriter.statusResponse ( int status)
inline

◆ subscriptionResponse()

void eu.baltrad.dex.net.protocol.impl.ProtocolVersionResponseWriter.subscriptionResponse ( String localNodeName,
List< Subscription > subscriptions,
int status ) throws IOException
inline

◆ userAccountResponse()

void eu.baltrad.dex.net.protocol.impl.ProtocolVersionResponseWriter.userAccountResponse ( String localNodeName,
User user,
int status ) throws IOException
inline

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