Package com.github.fridujo.rabbitmq.mock
Class MockConnection
- java.lang.Object
-
- com.github.fridujo.rabbitmq.mock.MockConnection
-
- All Implemented Interfaces:
com.rabbitmq.client.Connection,com.rabbitmq.client.ShutdownNotifier,Closeable,AutoCloseable
public class MockConnection extends Object implements com.rabbitmq.client.Connection
-
-
Constructor Summary
Constructors Constructor Description MockConnection(MockNode mockNode, MetricsCollectorWrapper metricsCollectorWrapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()voidabort(int timeout)voidabort(int closeCode, String closeMessage)voidabort(int closeCode, String closeMessage, int timeout)com.rabbitmq.client.BlockedListeneraddBlockedListener(com.rabbitmq.client.BlockedCallback blockedCallback, com.rabbitmq.client.UnblockedCallback unblockedCallback)voidaddBlockedListener(com.rabbitmq.client.BlockedListener listener)voidaddShutdownListener(com.rabbitmq.client.ShutdownListener listener)voidclearBlockedListeners()voidclose()voidclose(int timeout)voidclose(int closeCode, String closeMessage)voidclose(int closeCode, String closeMessage, int timeout)MockChannelcreateChannel()MockChannelcreateChannel(int channelNumber)InetAddressgetAddress()intgetChannelMax()Map<String,Object>getClientProperties()StringgetClientProvidedName()com.rabbitmq.client.ShutdownSignalExceptiongetCloseReason()com.rabbitmq.client.ExceptionHandlergetExceptionHandler()intgetFrameMax()intgetHeartbeat()StringgetId()intgetPort()Map<String,Object>getServerProperties()booleanisOpen()voidnotifyListeners()booleanremoveBlockedListener(com.rabbitmq.client.BlockedListener listener)voidremoveShutdownListener(com.rabbitmq.client.ShutdownListener listener)voidsetId(String id)
-
-
-
Constructor Detail
-
MockConnection
public MockConnection(MockNode mockNode, MetricsCollectorWrapper metricsCollectorWrapper)
-
-
Method Detail
-
getAddress
public InetAddress getAddress()
- Specified by:
getAddressin interfacecom.rabbitmq.client.Connection
-
getPort
public int getPort()
- Specified by:
getPortin interfacecom.rabbitmq.client.Connection
-
getChannelMax
public int getChannelMax()
- Specified by:
getChannelMaxin interfacecom.rabbitmq.client.Connection
-
getFrameMax
public int getFrameMax()
- Specified by:
getFrameMaxin interfacecom.rabbitmq.client.Connection
-
getHeartbeat
public int getHeartbeat()
- Specified by:
getHeartbeatin interfacecom.rabbitmq.client.Connection
-
getClientProperties
public Map<String,Object> getClientProperties()
- Specified by:
getClientPropertiesin interfacecom.rabbitmq.client.Connection
-
getClientProvidedName
public String getClientProvidedName()
- Specified by:
getClientProvidedNamein interfacecom.rabbitmq.client.Connection
-
getServerProperties
public Map<String,Object> getServerProperties()
- Specified by:
getServerPropertiesin interfacecom.rabbitmq.client.Connection
-
createChannel
public MockChannel createChannel() throws com.rabbitmq.client.AlreadyClosedException
- Specified by:
createChannelin interfacecom.rabbitmq.client.Connection- Throws:
com.rabbitmq.client.AlreadyClosedException
-
createChannel
public MockChannel createChannel(int channelNumber) throws com.rabbitmq.client.AlreadyClosedException
- Specified by:
createChannelin interfacecom.rabbitmq.client.Connection- Throws:
com.rabbitmq.client.AlreadyClosedException
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfacecom.rabbitmq.client.Connection
-
close
public void close(int closeCode, String closeMessage)- Specified by:
closein interfacecom.rabbitmq.client.Connection
-
close
public void close(int timeout)
- Specified by:
closein interfacecom.rabbitmq.client.Connection
-
close
public void close(int closeCode, String closeMessage, int timeout)- Specified by:
closein interfacecom.rabbitmq.client.Connection
-
abort
public void abort()
- Specified by:
abortin interfacecom.rabbitmq.client.Connection
-
abort
public void abort(int closeCode, String closeMessage)- Specified by:
abortin interfacecom.rabbitmq.client.Connection
-
abort
public void abort(int timeout)
- Specified by:
abortin interfacecom.rabbitmq.client.Connection
-
abort
public void abort(int closeCode, String closeMessage, int timeout)- Specified by:
abortin interfacecom.rabbitmq.client.Connection
-
addBlockedListener
public void addBlockedListener(com.rabbitmq.client.BlockedListener listener)
- Specified by:
addBlockedListenerin interfacecom.rabbitmq.client.Connection
-
addBlockedListener
public com.rabbitmq.client.BlockedListener addBlockedListener(com.rabbitmq.client.BlockedCallback blockedCallback, com.rabbitmq.client.UnblockedCallback unblockedCallback)- Specified by:
addBlockedListenerin interfacecom.rabbitmq.client.Connection
-
removeBlockedListener
public boolean removeBlockedListener(com.rabbitmq.client.BlockedListener listener)
- Specified by:
removeBlockedListenerin interfacecom.rabbitmq.client.Connection
-
clearBlockedListeners
public void clearBlockedListeners()
- Specified by:
clearBlockedListenersin interfacecom.rabbitmq.client.Connection
-
getExceptionHandler
public com.rabbitmq.client.ExceptionHandler getExceptionHandler()
- Specified by:
getExceptionHandlerin interfacecom.rabbitmq.client.Connection
-
getId
public String getId()
- Specified by:
getIdin interfacecom.rabbitmq.client.Connection
-
setId
public void setId(String id)
- Specified by:
setIdin interfacecom.rabbitmq.client.Connection
-
addShutdownListener
public void addShutdownListener(com.rabbitmq.client.ShutdownListener listener)
- Specified by:
addShutdownListenerin interfacecom.rabbitmq.client.ShutdownNotifier
-
removeShutdownListener
public void removeShutdownListener(com.rabbitmq.client.ShutdownListener listener)
- Specified by:
removeShutdownListenerin interfacecom.rabbitmq.client.ShutdownNotifier
-
getCloseReason
public com.rabbitmq.client.ShutdownSignalException getCloseReason()
- Specified by:
getCloseReasonin interfacecom.rabbitmq.client.ShutdownNotifier
-
notifyListeners
public void notifyListeners()
- Specified by:
notifyListenersin interfacecom.rabbitmq.client.ShutdownNotifier
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfacecom.rabbitmq.client.ShutdownNotifier
-
-