public class SharedMBeanServerConnection extends java.lang.Object implements ConnectionProvider<javax.management.MBeanServerConnection>, WriteLockSupport<javax.management.MBeanServerConnection>
Modifier and Type | Field and Description |
---|---|
protected javax.management.MBeanServerConnection |
conn_ |
Constructor and Description |
---|
SharedMBeanServerConnection() |
SharedMBeanServerConnection(javax.management.MBeanServerConnection conn) |
Modifier and Type | Method and Description |
---|---|
javax.management.MBeanServerConnection |
getConnection(Session sessionId)
Get a Connection of specified type.
|
ReadLockSupport<javax.management.MBeanServerConnection> |
getReadLockSupport()
Should return null if read lock is not required when reading from connection.
|
WriteLockSupport<javax.management.MBeanServerConnection> |
getWriteLockSupport()
Should return null if write lock is not required when writing to connection.
|
void |
releaseConnection(Session session)
Release a connection
|
void |
releaseWriteLock(javax.management.MBeanServerConnection resource) |
void |
tryWriteLock(javax.management.MBeanServerConnection resource,
long milliseconds) |
void |
writeLock(javax.management.MBeanServerConnection resource) |
public SharedMBeanServerConnection()
public SharedMBeanServerConnection(javax.management.MBeanServerConnection conn)
public javax.management.MBeanServerConnection getConnection(Session sessionId)
ConnectionProvider
getConnection
in interface ConnectionProvider<javax.management.MBeanServerConnection>
public void releaseConnection(Session session)
ConnectionProvider
releaseConnection
in interface ConnectionProvider<javax.management.MBeanServerConnection>
public void writeLock(javax.management.MBeanServerConnection resource)
writeLock
in interface WriteLockSupport<javax.management.MBeanServerConnection>
public void tryWriteLock(javax.management.MBeanServerConnection resource, long milliseconds) throws java.lang.InterruptedException
tryWriteLock
in interface WriteLockSupport<javax.management.MBeanServerConnection>
java.lang.InterruptedException
public void releaseWriteLock(javax.management.MBeanServerConnection resource)
releaseWriteLock
in interface WriteLockSupport<javax.management.MBeanServerConnection>
public WriteLockSupport<javax.management.MBeanServerConnection> getWriteLockSupport()
ConnectionProvider
getWriteLockSupport
in interface ConnectionProvider<javax.management.MBeanServerConnection>
public ReadLockSupport<javax.management.MBeanServerConnection> getReadLockSupport()
ConnectionProvider
getReadLockSupport
in interface ConnectionProvider<javax.management.MBeanServerConnection>