org.mobicents.slee.services.sip.balancer.mbean
Interface BalancerNodeMonitorMBeanImplMBean

All Superinterfaces:
org.jboss.system.Service, org.jboss.system.ServiceMBean
All Known Implementing Classes:
BalancerNodeMonitorMBeanImpl

public interface BalancerNodeMonitorMBeanImplMBean
extends org.jboss.system.ServiceMBean


Field Summary
 
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
 
Method Summary
 boolean addBalancerAddress(byte[] addr)
           
 boolean addBalancerAddress(java.lang.String hostName, int index)
          Adds balancer address to distribution list.
 boolean addRAMBeanRegex(java.lang.String regex)
          Adds MBean regex - this regex must follow ObjectName convention - "slee:management=*"
 java.util.List<java.lang.String> getBalancers()
           
 long getHeartBeatInterval()
           
 java.util.List<java.lang.String> getRABeansRegex()
           
 boolean removeBalancerAddress(byte[] addr)
          Tries to remove balancer with name: addr[0].addr[1].addr[2].addr[3]
 void removeBalancerAddress(int index)
           
 boolean removeBalancerAddress(java.lang.String hostName, int index)
           
 void removeRAMBeanRegex(int index)
          Removes mbean regex
 boolean removeRAMBeanRegex(java.lang.String regex)
          Removes mbean regex
 void setHeartBeatInterval(long heartBeatInterval)
           
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Method Detail

getBalancers

java.util.List<java.lang.String> getBalancers()
Returns:
- list of String objects representing balancer addresses. Example content:
  • 192.168.1.100
  • ala.ma.kota.pl

addBalancerAddress

boolean addBalancerAddress(byte[] addr)
                           throws java.lang.IllegalArgumentException,
                                  java.lang.NullPointerException,
                                  java.io.IOException
Throws:
java.lang.IllegalArgumentException
java.lang.NullPointerException
java.io.IOException

addBalancerAddress

boolean addBalancerAddress(java.lang.String hostName,
                           int index)
                           throws java.lang.IllegalArgumentException,
                                  java.lang.NullPointerException,
                                  java.io.IOException
Adds balancer address to distribution list. Tries to connect to it.

Parameters:
hostName - - name of the host to be looked up in DNS
index - - 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
Throws:
java.lang.IllegalArgumentException
java.lang.NullPointerException
java.io.IOException

removeBalancerAddress

boolean removeBalancerAddress(byte[] addr)
                              throws java.lang.IllegalArgumentException,
                                     java.lang.NullPointerException
Tries to remove balancer with name: addr[0].addr[1].addr[2].addr[3]

Parameters:
addr - - The argument is address representation in network byte order: the highest order byte of the address is in [0].
port - - port on which remote balancer listens
Returns:
  • true - if name exists and was removed
  • false - otherwise
Throws:
java.lang.IllegalArgumentException - - if there is no balancer with that name on the list.
java.lang.NullPointerException - - if addr==null

removeBalancerAddress

boolean removeBalancerAddress(java.lang.String hostName,
                              int index)
                              throws java.lang.IllegalArgumentException,
                                     java.lang.NullPointerException
Throws:
java.lang.IllegalArgumentException
java.lang.NullPointerException

removeBalancerAddress

void removeBalancerAddress(int index)
                           throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

getRABeansRegex

java.util.List<java.lang.String> getRABeansRegex()
Returns:
List of pseduo regular expresion - one that can be used to lokup group of mbeans like, "slee:management=*". List that is stored here is used to lookup SIPRA confiruration mbeans ant fetch data from it. After that this data is shiped to balancers

addRAMBeanRegex

boolean addRAMBeanRegex(java.lang.String regex)
                        throws java.lang.IllegalArgumentException,
                               java.lang.NullPointerException
Adds MBean regex - this regex must follow ObjectName convention - "slee:management=*"

Parameters:
regex -
Returns:
  • true - there wasnt regex that mathces this one and operation was success
  • false - otherwise
Throws:
java.lang.IllegalArgumentException - - does not follow ObjectName convention
java.lang.NullPointerException - - arg is null

removeRAMBeanRegex

boolean removeRAMBeanRegex(java.lang.String regex)
                           throws java.lang.NullPointerException
Removes mbean regex

Parameters:
regex -
Returns:
  • true - there was regex that mathces this one and operation was success
  • false - otherwise
Throws:
java.lang.NullPointerException

removeRAMBeanRegex

void removeRAMBeanRegex(int index)
                        throws java.lang.IllegalArgumentException
Removes mbean regex

Parameters:
regex -
Throws:
java.lang.IllegalArgumentException - - wrong index

getHeartBeatInterval

long getHeartBeatInterval()

setHeartBeatInterval

void setHeartBeatInterval(long heartBeatInterval)


Copyright © 2008. All Rights Reserved.