org.mobicents.slee.services.sip.balancer.mbean
Class BalancerNodeMonitorMBeanImpl
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.mobicents.slee.services.sip.balancer.mbean.BalancerNodeMonitorMBeanImpl
- All Implemented Interfaces:
- javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean, BalancerNodeMonitorMBeanImplMBean
public class BalancerNodeMonitorMBeanImpl
- extends org.jboss.system.ServiceMBeanSupport
- implements BalancerNodeMonitorMBeanImplMBean
| Fields inherited from class org.jboss.system.ServiceMBeanSupport |
log, server, SERVICE_CONTROLLER_SIG, serviceName |
| Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
| Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop |
| Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jboss.system.ServiceMBean |
getName, getState, getStateString, jbossInternalLifecycle |
| Methods inherited from interface org.jboss.system.Service |
create, destroy, start, stop |
BalancerNodeMonitorMBeanImpl
public BalancerNodeMonitorMBeanImpl()
startService
protected void startService()
throws java.lang.Exception
- Overrides:
startService in class org.jboss.system.ServiceMBeanSupport
- Throws:
java.lang.Exception
stopService
protected void stopService()
throws java.lang.Exception
- Overrides:
stopService in class org.jboss.system.ServiceMBeanSupport
- Throws:
java.lang.Exception
addRAMBeanRegex
public boolean addRAMBeanRegex(java.lang.String regex)
throws java.lang.IllegalArgumentException,
java.lang.NullPointerException
- Throws:
java.lang.IllegalArgumentException
java.lang.NullPointerException
removeRAMBeanRegex
public boolean removeRAMBeanRegex(java.lang.String regex)
throws java.lang.NullPointerException
- Throws:
java.lang.NullPointerException
removeRAMBeanRegex
public void removeRAMBeanRegex(int index)
throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
getHeartBeatInterval
public long getHeartBeatInterval()
-
- Specified by:
getHeartBeatInterval in interface BalancerNodeMonitorMBeanImplMBean
setHeartBeatInterval
public void setHeartBeatInterval(long heartBeatInterval)
-
- Specified by:
setHeartBeatInterval in interface BalancerNodeMonitorMBeanImplMBean
getBalancers
public java.lang.String[] getBalancers()
-
- Specified by:
getBalancers in interface BalancerNodeMonitorMBeanImplMBean
- Returns:
- - list of String objects representing balancer addresses. Example
content:
- 192.168.1.100
- ala.ma.kota.pl
removeBalancerAddress
public void removeBalancerAddress(int index)
throws java.lang.IllegalArgumentException
-
- Specified by:
removeBalancerAddress in interface BalancerNodeMonitorMBeanImplMBean
- Throws:
java.lang.IllegalArgumentException
addBalancerAddress
public boolean addBalancerAddress(java.lang.String addr)
-
- Specified by:
addBalancerAddress in interface BalancerNodeMonitorMBeanImplMBean
addBalancerAddress
public boolean addBalancerAddress(java.lang.String hostName,
int index)
- Adds balancer address to distribution list. Tries to connect to it.
- Specified by:
addBalancerAddress in interface BalancerNodeMonitorMBeanImplMBean
- Parameters:
hostName - -
name of the host to be looked up in DNSindex - -
possible index of IP address when host has more than one
address - like InetAddress.getAllByName(..);
- Returns:
- true - if address didnt exist and it has been
injected into list
- false - otherwise
removeBalancerAddress
public boolean removeBalancerAddress(java.lang.String addr)
- Tries to remove balancer with name: addr[0].addr[1].addr[2].addr[3]
- Specified by:
removeBalancerAddress in interface BalancerNodeMonitorMBeanImplMBean
- Parameters:
addr - -
The argument is address representation in network byte order:
the highest order byte of the address is in [0].
- Returns:
- true - if name exists and was removed
- false - otherwise
removeBalancerAddress
public boolean removeBalancerAddress(java.lang.String hostName,
int index)
-
- Specified by:
removeBalancerAddress in interface BalancerNodeMonitorMBeanImplMBean
setBalancers
public void setBalancers(java.lang.String balancers)
- Parameters:
balancers - the balancers to set
Copyright © 2008. All Rights Reserved.