Interface TransportChannel

All Known Implementing Classes:
TaskTransportChannel, TcpTransportChannel

public interface TransportChannel
A transport channel allows to send a response to a request on the channel.
  • Field Summary

    Fields
    Modifier and Type Field Description
    static org.apache.logging.log4j.Logger logger  
  • Method Summary

    Modifier and Type Method Description
    java.lang.String getChannelType()  
    java.lang.String getProfileName()  
    default Version getVersion()
    Returns the version of the other party that this channel will send a response to.
    static void sendErrorResponse​(TransportChannel channel, java.lang.String actionName, TransportRequest request, java.lang.Exception e)
    A helper method to send an exception and handle and log a subsequent exception
    void sendResponse​(java.lang.Exception exception)  
    void sendResponse​(TransportResponse response)  
  • Field Details

    • logger

      static final org.apache.logging.log4j.Logger logger
  • Method Details

    • getProfileName

      java.lang.String getProfileName()
    • getChannelType

      java.lang.String getChannelType()
    • sendResponse

      void sendResponse​(TransportResponse response) throws java.io.IOException
      Throws:
      java.io.IOException
    • sendResponse

      void sendResponse​(java.lang.Exception exception) throws java.io.IOException
      Throws:
      java.io.IOException
    • getVersion

      default Version getVersion()
      Returns the version of the other party that this channel will send a response to.
    • sendErrorResponse

      static void sendErrorResponse​(TransportChannel channel, java.lang.String actionName, TransportRequest request, java.lang.Exception e)
      A helper method to send an exception and handle and log a subsequent exception