java.lang.Object
com.sportradar.unifiedodds.sdk.internal.impl.rabbitconnection.SdkConnection
All Implemented Interfaces:
com.rabbitmq.client.Connection, com.rabbitmq.client.ShutdownNotifier, Closeable, AutoCloseable

public class SdkConnection extends Object implements com.rabbitmq.client.Connection
A wrapper around RabbitMQ Connection which automatically closes the connection when there are no more opened channels channels
  • Constructor Details

    • SdkConnection

      public SdkConnection(com.rabbitmq.client.Connection actualConnection)
      Initializes a new instance of the SdkConnection class
      Parameters:
      actualConnection - A Connection instance wrapped with current SdkConnection instance
  • Method Details

    • getAddress

      public InetAddress getAddress()
      Specified by:
      getAddress in interface com.rabbitmq.client.Connection
    • getPort

      public int getPort()
      Specified by:
      getPort in interface com.rabbitmq.client.Connection
    • getChannelMax

      public int getChannelMax()
      Specified by:
      getChannelMax in interface com.rabbitmq.client.Connection
    • getFrameMax

      public int getFrameMax()
      Specified by:
      getFrameMax in interface com.rabbitmq.client.Connection
    • getHeartbeat

      public int getHeartbeat()
      Specified by:
      getHeartbeat in interface com.rabbitmq.client.Connection
    • getClientProperties

      public Map<String,Object> getClientProperties()
      Specified by:
      getClientProperties in interface com.rabbitmq.client.Connection
    • getClientProvidedName

      public String getClientProvidedName()
      Specified by:
      getClientProvidedName in interface com.rabbitmq.client.Connection
    • getServerProperties

      public Map<String,Object> getServerProperties()
      Specified by:
      getServerProperties in interface com.rabbitmq.client.Connection
    • createChannel

      public com.rabbitmq.client.Channel createChannel() throws IOException
      Specified by:
      createChannel in interface com.rabbitmq.client.Connection
      Throws:
      IOException
    • createChannel

      public com.rabbitmq.client.Channel createChannel(int i) throws IOException
      Specified by:
      createChannel in interface com.rabbitmq.client.Connection
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface com.rabbitmq.client.Connection
      Throws:
      IOException
    • close

      public void close(int i, String s) throws IOException
      Specified by:
      close in interface com.rabbitmq.client.Connection
      Throws:
      IOException
    • close

      public void close(int i) throws IOException
      Specified by:
      close in interface com.rabbitmq.client.Connection
      Throws:
      IOException
    • close

      public void close(int i, String s, int i2) throws IOException
      Specified by:
      close in interface com.rabbitmq.client.Connection
      Throws:
      IOException
    • abort

      public void abort()
      Specified by:
      abort in interface com.rabbitmq.client.Connection
    • abort

      public void abort(int i, String s)
      Specified by:
      abort in interface com.rabbitmq.client.Connection
    • abort

      public void abort(int i)
      Specified by:
      abort in interface com.rabbitmq.client.Connection
    • abort

      public void abort(int i, String s, int i2)
      Specified by:
      abort in interface com.rabbitmq.client.Connection
    • addBlockedListener

      public void addBlockedListener(com.rabbitmq.client.BlockedListener blockedListener)
      Specified by:
      addBlockedListener in interface com.rabbitmq.client.Connection
    • addBlockedListener

      public com.rabbitmq.client.BlockedListener addBlockedListener(com.rabbitmq.client.BlockedCallback blockedCallback, com.rabbitmq.client.UnblockedCallback unblockedCallback)
      Specified by:
      addBlockedListener in interface com.rabbitmq.client.Connection
    • removeBlockedListener

      public boolean removeBlockedListener(com.rabbitmq.client.BlockedListener blockedListener)
      Specified by:
      removeBlockedListener in interface com.rabbitmq.client.Connection
    • clearBlockedListeners

      public void clearBlockedListeners()
      Specified by:
      clearBlockedListeners in interface com.rabbitmq.client.Connection
    • getExceptionHandler

      public com.rabbitmq.client.ExceptionHandler getExceptionHandler()
      Specified by:
      getExceptionHandler in interface com.rabbitmq.client.Connection
    • getId

      public String getId()
      Specified by:
      getId in interface com.rabbitmq.client.Connection
    • setId

      public void setId(String s)
      Specified by:
      setId in interface com.rabbitmq.client.Connection
    • addShutdownListener

      public void addShutdownListener(com.rabbitmq.client.ShutdownListener shutdownListener)
      Specified by:
      addShutdownListener in interface com.rabbitmq.client.ShutdownNotifier
    • removeShutdownListener

      public void removeShutdownListener(com.rabbitmq.client.ShutdownListener shutdownListener)
      Specified by:
      removeShutdownListener in interface com.rabbitmq.client.ShutdownNotifier
    • getCloseReason

      public com.rabbitmq.client.ShutdownSignalException getCloseReason()
      Specified by:
      getCloseReason in interface com.rabbitmq.client.ShutdownNotifier
    • notifyListeners

      public void notifyListeners()
      Specified by:
      notifyListeners in interface com.rabbitmq.client.ShutdownNotifier
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface com.rabbitmq.client.ShutdownNotifier