org.apache.qpid.server.protocol
Interface ManagedConnection


public interface ManagedConnection

The management interface exposed to allow management of Connections.

Version:
0.1
Author:
Bhupendra Bhardwaj

Field Summary
static java.lang.String TYPE
           
 
Method Summary
 void closeChannel(int channelId)
          Unsubscribes the consumers and unregisters the channel from managed objects.
 void closeConnection()
          Closes all the related channels and unregisters this connection from managed objects.
 void commitTransactions(int channelId)
          Commits the transactions if the channel is transactional.
 javax.management.openmbean.TabularData getChannels()
          channel details of all the channels opened for this connection.
 java.util.Date getLastIoTime()
          Tells the last time, the IO operation was done.
 java.lang.Long getMaximumNumberOfAllowedChannels()
          Tells the maximum number of channels that can be opened using this connection.
 java.lang.Long getReadBytes()
          Tells the total number of bytes read till now.
 java.lang.String getRemoteAddress()
          Tells the remote address of this connection.
 java.lang.Long getWrittenBytes()
          Tells the total number of bytes written till now.
 void rollbackTransactions(int channelId)
          Rollsback the transactions if the channel is transactional.
 void setMaximumNumberOfAllowedChannels(java.lang.Long value)
          Sets the maximum number of channels allowed to be created using this connection.
 

Field Detail

TYPE

static final java.lang.String TYPE
See Also:
Constant Field Values
Method Detail

getChannels

javax.management.openmbean.TabularData getChannels()
                                                   throws java.io.IOException,
                                                          javax.management.JMException
channel details of all the channels opened for this connection.

Returns:
general channel details
Throws:
java.io.IOException
javax.management.JMException

getLastIoTime

java.util.Date getLastIoTime()
Tells the last time, the IO operation was done.

Returns:
last IO time.

getRemoteAddress

java.lang.String getRemoteAddress()
Tells the remote address of this connection.

Returns:
remote address

getWrittenBytes

java.lang.Long getWrittenBytes()
Tells the total number of bytes written till now.

Returns:
number of bytes written.

getReadBytes

java.lang.Long getReadBytes()
Tells the total number of bytes read till now.

Returns:
number of bytes read.

getMaximumNumberOfAllowedChannels

java.lang.Long getMaximumNumberOfAllowedChannels()
Tells the maximum number of channels that can be opened using this connection. This is useful in setting notifications or taking required action is there are more channels being created.

Returns:
maximum number of channels allowed to be created.

setMaximumNumberOfAllowedChannels

void setMaximumNumberOfAllowedChannels(java.lang.Long value)
Sets the maximum number of channels allowed to be created using this connection.

Parameters:
value -

closeConnection

void closeConnection()
                     throws java.lang.Exception
Closes all the related channels and unregisters this connection from managed objects.

Throws:
java.lang.Exception

closeChannel

void closeChannel(int channelId)
                  throws java.lang.Exception
Unsubscribes the consumers and unregisters the channel from managed objects.

Throws:
java.lang.Exception

commitTransactions

void commitTransactions(int channelId)
                        throws javax.management.JMException
Commits the transactions if the channel is transactional.

Parameters:
channelId -
Throws:
javax.management.JMException

rollbackTransactions

void rollbackTransactions(int channelId)
                          throws javax.management.JMException
Rollsback the transactions if the channel is transactional.

Parameters:
channelId -
Throws:
javax.management.JMException