Class SdkConnection
java.lang.Object
com.sportradar.unifiedodds.sdk.internal.impl.rabbitconnection.SdkConnection
- All Implemented Interfaces:
com.rabbitmq.client.Connection,com.rabbitmq.client.ShutdownNotifier,Closeable,AutoCloseable
A wrapper around RabbitMQ
Connection which automatically closes the connection when there
are no more opened channels channels-
Constructor Summary
ConstructorsConstructorDescriptionSdkConnection(com.rabbitmq.client.Connection actualConnection) Initializes a new instance of theSdkConnectionclass -
Method Summary
Modifier and TypeMethodDescriptionvoidabort()voidabort(int i) voidvoidcom.rabbitmq.client.BlockedListeneraddBlockedListener(com.rabbitmq.client.BlockedCallback blockedCallback, com.rabbitmq.client.UnblockedCallback unblockedCallback) voidaddBlockedListener(com.rabbitmq.client.BlockedListener blockedListener) voidaddShutdownListener(com.rabbitmq.client.ShutdownListener shutdownListener) voidvoidclose()voidclose(int i) voidvoidcom.rabbitmq.client.Channelcom.rabbitmq.client.ChannelcreateChannel(int i) intcom.rabbitmq.client.ShutdownSignalExceptioncom.rabbitmq.client.ExceptionHandlerintintgetId()intgetPort()booleanisOpen()voidbooleanremoveBlockedListener(com.rabbitmq.client.BlockedListener blockedListener) voidremoveShutdownListener(com.rabbitmq.client.ShutdownListener shutdownListener) voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.rabbitmq.client.Connection
openChannel, openChannel
-
Constructor Details
-
SdkConnection
public SdkConnection(com.rabbitmq.client.Connection actualConnection) Initializes a new instance of theSdkConnectionclass- Parameters:
actualConnection- AConnectioninstance wrapped with currentSdkConnectioninstance
-
-
Method Details
-
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
- Specified by:
getClientPropertiesin interfacecom.rabbitmq.client.Connection
-
getClientProvidedName
- Specified by:
getClientProvidedNamein interfacecom.rabbitmq.client.Connection
-
getServerProperties
- Specified by:
getServerPropertiesin interfacecom.rabbitmq.client.Connection
-
createChannel
- Specified by:
createChannelin interfacecom.rabbitmq.client.Connection- Throws:
IOException
-
createChannel
- Specified by:
createChannelin interfacecom.rabbitmq.client.Connection- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfacecom.rabbitmq.client.Connection- Throws:
IOException
-
close
- Specified by:
closein interfacecom.rabbitmq.client.Connection- Throws:
IOException
-
close
- Specified by:
closein interfacecom.rabbitmq.client.Connection- Throws:
IOException
-
close
- Specified by:
closein interfacecom.rabbitmq.client.Connection- Throws:
IOException
-
abort
public void abort()- Specified by:
abortin interfacecom.rabbitmq.client.Connection
-
abort
- Specified by:
abortin interfacecom.rabbitmq.client.Connection
-
abort
public void abort(int i) - Specified by:
abortin interfacecom.rabbitmq.client.Connection
-
abort
- Specified by:
abortin interfacecom.rabbitmq.client.Connection
-
addBlockedListener
public void addBlockedListener(com.rabbitmq.client.BlockedListener blockedListener) - 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 blockedListener) - 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
- Specified by:
getIdin interfacecom.rabbitmq.client.Connection
-
setId
- Specified by:
setIdin interfacecom.rabbitmq.client.Connection
-
addShutdownListener
public void addShutdownListener(com.rabbitmq.client.ShutdownListener shutdownListener) - Specified by:
addShutdownListenerin interfacecom.rabbitmq.client.ShutdownNotifier
-
removeShutdownListener
public void removeShutdownListener(com.rabbitmq.client.ShutdownListener shutdownListener) - 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
-