Class MockConnection

  • All Implemented Interfaces:
    com.rabbitmq.client.Connection, com.rabbitmq.client.ShutdownNotifier, Closeable, AutoCloseable

    public class MockConnection
    extends Object
    implements com.rabbitmq.client.Connection
    • Method Detail

      • 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 MockChannel createChannel()
                                  throws com.rabbitmq.client.AlreadyClosedException
        Specified by:
        createChannel in interface com.rabbitmq.client.Connection
        Throws:
        com.rabbitmq.client.AlreadyClosedException
      • createChannel

        public MockChannel createChannel​(int channelNumber)
                                  throws com.rabbitmq.client.AlreadyClosedException
        Specified by:
        createChannel in interface com.rabbitmq.client.Connection
        Throws:
        com.rabbitmq.client.AlreadyClosedException
      • close

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

        public void close​(int closeCode,
                          String closeMessage)
        Specified by:
        close in interface com.rabbitmq.client.Connection
      • close

        public void close​(int timeout)
        Specified by:
        close in interface com.rabbitmq.client.Connection
      • close

        public void close​(int closeCode,
                          String closeMessage,
                          int timeout)
        Specified by:
        close in interface com.rabbitmq.client.Connection
      • abort

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

        public void abort​(int closeCode,
                          String closeMessage)
        Specified by:
        abort in interface com.rabbitmq.client.Connection
      • abort

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

        public void abort​(int closeCode,
                          String closeMessage,
                          int timeout)
        Specified by:
        abort in interface com.rabbitmq.client.Connection
      • addBlockedListener

        public void addBlockedListener​(com.rabbitmq.client.BlockedListener listener)
        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 listener)
        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 id)
        Specified by:
        setId in interface com.rabbitmq.client.Connection
      • addShutdownListener

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

        public void removeShutdownListener​(com.rabbitmq.client.ShutdownListener listener)
        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