Package org.acemq.rabbitmq.admin
Class ConnectionInfo
java.lang.Object
org.acemq.rabbitmq.admin.ConnectionInfo
One client connection, as the broker sees it.
The answer to "which client is doing this". A connection knows its user, its virtual host, where it came from, and — if the client bothered to set it — what the application calls itself.
-
Constructor Details
-
ConnectionInfo
-
-
Method Details
-
name
- Returns:
- the broker's name for this connection, of the form
10.0.0.1:52344 -> 10.0.0.2:5672. This is the identifierRabbitAdmin.closeConnection(String, String)takes, and it contains spaces and a>— encode it before putting it in a URL, which that method does for you
-
user
- Returns:
- the broker user this connection authenticated as
-
vhost
-
state
- Returns:
running,blocked,blockingorclosed.blockedmeans a resource alarm is holding this publisher, and is the per-connection view of whatHealth.alarms()reports for the broker
-
isBlocked
public boolean isBlocked()- Returns:
- whether this connection is currently blocked by a resource alarm
-
node
-
protocol
- Returns:
- the protocol and version, for example
AMQP 0-9-1
-
peerHost
-
peerPort
public int peerPort() -
channels
public int channels()- Returns:
- how many channels are open on it
-
connectedAt
- Returns:
- when it connected, if the broker reported it
-
ssl
public boolean ssl() -
userProvidedName
- Returns:
- the name the client gave itself, when it gave one. Worth setting in every application: without it a connection is an IP and a port, and identifying which of six services is the one misbehaving means matching ports against container addresses
-
clientProperties
- Returns:
- what the client library reported about itself: product, version, platform
-
toString
-