Interface Transport

All Known Subinterfaces:
ClientTransport, NIOTransport
All Known Implementing Classes:
NIOSocketTransport, NIOTCPTransport, SocketTransport, SSLTCPTransport, TCPTransport, UDPTransport

public interface Transport
Common transport interface. Provides ability to read and write the messages.
  • Method Details

    • isBlockingSocket

      boolean isBlockingSocket()
    • write

      void write(byte[] message) throws IOException
      Transport dependent write method.
      Parameters:
      message - actual message
      Throws:
      IOException - if unable to write
    • write

      int write(ByteBuffer message) throws IOException
      Throws:
      IOException
    • write

      int write(byte[] message, int offset, int length) throws IOException
      Transport dependent write method.
      Parameters:
      message - actual message
      offset - the offset in buffer
      length - the num of bytes to write
      Throws:
      IOException - if unable to write
    • write

      int write(ByteBuffer message, int offset, int length) throws IOException
      Throws:
      IOException
    • waitUntilReadyToWrite

      void waitUntilReadyToWrite() throws IOException
      Throws:
      IOException
    • read

      int read(byte[] buffer, int offset, int length) throws IOException
      Transport dependent read method.
      Parameters:
      buffer - holder for read bytes
      offset - in buffer
      length - maximum bytes to be read
      Returns:
      number of byte actually read
      Throws:
      IOException - if unable to read
    • read

      int read(ByteBuffer buffer, int offset, int length) throws IOException
      Throws:
      IOException
    • read

      int read(byte[] buffer) throws IOException
      Transport dependent read method.
      Parameters:
      buffer - holder for read bytes
      Returns:
      number of byte actually read
      Throws:
      IOException - if unable to read
    • read

      int read(ByteBuffer buffer) throws IOException
      Throws:
      IOException
    • getAddress

      String getAddress()
      Getter for address value.
    • getInetAddress

      InetAddress getInetAddress()
      Getter for address value.
    • getPort

      int getPort()
      Getter for port value.
    • getLocalPort

      int getLocalPort()
      Getter for local port value.
    • open

      void open() throws IOException
      Open the transport.
      Throws:
      IOException - - throws if error occurred
    • close

      void close() throws IOException
      Close the transport.
      Throws:
      IOException - - throws if error occurred
    • isOpen

      boolean isOpen()
      Returns true if, transport is open.
    • getSSLProtocol

      default String getSSLProtocol()
      Getter for ssl protocol from session
    • getSSLCipherSuite

      default String getSSLCipherSuite()
      Getter for cipher suite from session
    • getSSLCertificates

      default Certificate[] getSSLCertificates()
      Getter for certificates from session