Appia Documentation

net.sf.appia.management.jmx
Class ChannelManager

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by net.sf.appia.management.jmx.ChannelManager
All Implemented Interfaces:
javax.management.DynamicMBean, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, SensorSessionListener

public class ChannelManager
extends javax.management.NotificationBroadcasterSupport
implements javax.management.DynamicMBean, SensorSessionListener

This class defines a ChannelManager.

Version:
1.0
Author:
Nuno Carvalho

Constructor Summary
ChannelManager(Channel ch)
          Creates a new ChannelManager.
 
Method Summary
 void addManagedSession(Session s)
          Adds a session to manage.
 java.lang.Object getAttribute(java.lang.String att)
           
 javax.management.AttributeList getAttributes(java.lang.String[] attrs)
           
 java.lang.String getChannelName()
          Gets the name of the managed channel.
 javax.management.MBeanInfo getMBeanInfo()
           
 boolean getStarted()
           
 int getUsedMemory()
           
 java.lang.Object invoke(java.lang.String actionName, java.lang.Object[] params, java.lang.String[] signature)
           
 void onNotification(javax.management.Notification notification)
          Callback that receives a notification from the channel.
 Session removeManagedSession(Session s)
          Removes a session to manage.
 void setAttribute(javax.management.Attribute att)
           
 javax.management.AttributeList setAttributes(javax.management.AttributeList attList)
           
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChannelManager

public ChannelManager(Channel ch)
Creates a new ChannelManager.

Parameters:
ch - the managed channel.
Method Detail

addManagedSession

public void addManagedSession(Session s)
Adds a session to manage.

Parameters:
s - the session to manage.

removeManagedSession

public Session removeManagedSession(Session s)
Removes a session to manage.

Parameters:
s - the session to manage
Returns:
the removed session, or null if no session was removed.

onNotification

public void onNotification(javax.management.Notification notification)
Callback that receives a notification from the channel. Received the notification and pushes it to the registered clients.

Specified by:
onNotification in interface SensorSessionListener
Parameters:
notification - the received notification
See Also:
SensorSessionListener.onNotification(javax.management.Notification)

getChannelName

public java.lang.String getChannelName()
Gets the name of the managed channel.

See Also:
ChannelManagerMBean.getChannelName()

getStarted

public boolean getStarted()

getUsedMemory

public int getUsedMemory()

getAttribute

public java.lang.Object getAttribute(java.lang.String att)
                              throws javax.management.AttributeNotFoundException,
                                     javax.management.MBeanException,
                                     javax.management.ReflectionException
Specified by:
getAttribute in interface javax.management.DynamicMBean
Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException

getAttributes

public javax.management.AttributeList getAttributes(java.lang.String[] attrs)
Specified by:
getAttributes in interface javax.management.DynamicMBean

getMBeanInfo

public javax.management.MBeanInfo getMBeanInfo()
Specified by:
getMBeanInfo in interface javax.management.DynamicMBean

invoke

public java.lang.Object invoke(java.lang.String actionName,
                               java.lang.Object[] params,
                               java.lang.String[] signature)
                        throws javax.management.MBeanException,
                               javax.management.ReflectionException
Specified by:
invoke in interface javax.management.DynamicMBean
Throws:
javax.management.MBeanException
javax.management.ReflectionException

setAttribute

public void setAttribute(javax.management.Attribute att)
                  throws javax.management.AttributeNotFoundException,
                         javax.management.InvalidAttributeValueException,
                         javax.management.MBeanException,
                         javax.management.ReflectionException
Specified by:
setAttribute in interface javax.management.DynamicMBean
Throws:
javax.management.AttributeNotFoundException
javax.management.InvalidAttributeValueException
javax.management.MBeanException
javax.management.ReflectionException

setAttributes

public javax.management.AttributeList setAttributes(javax.management.AttributeList attList)
Specified by:
setAttributes in interface javax.management.DynamicMBean

Appia Documentation

COPYRIGHT 2006-2009, University of Lisbon and INESC-ID
For updates and related information please see Appia Home Page
Send questions, sugestions or remarks to the appia-users mailing list