org.apache.commons.modeler.mbeans
Class SimpleRemoteConnector

java.lang.Object
  |
  +--org.apache.commons.modeler.mbeans.SimpleRemoteConnector

public class SimpleRemoteConnector
extends Object

Based on jk2 proxy. Proxy using a very simple HTTP based protocol. For efficiency, it'll get bulk results and cache them - you can force an update by calling the refreshAttributes and refreshMetadata operations on this mbean. TODO: implement the user/pass auth ( right now you must use IP based security ) TODO: eventually support https TODO: support for metadata ( mbean-descriptors ) for description and type conversions TODO: filter out trivial components ( mutexes, etc )


Constructor Summary
SimpleRemoteConnector()
           
 
Method Summary
 void destroy()
           
 String getDomain()
           
 String getFilter()
           
 String getPass()
           
 String getStatusPath()
           
protected  InputStream getStream(String qry)
          connect to apache using http, get a list of mbeans.
 long getUpdateInterval()
           
 String getUser()
           
 String getWebServerHost()
           
 int getWebServerPort()
           
 void init()
           
 Object invoke(Object oname, String name, Object[] params, String[] signature)
           
 void refresh()
          Refresh the proxies, if updateInterval passed
 void refreshAttributes()
           
 void refreshMetadata()
           
 void setAttribute(javax.management.ObjectName oname, javax.management.Attribute attribute)
           
 void setDomain(String domain)
           
 void setFilter(String filter)
           
 void setPass(String pass)
           
 void setStatusPath(String statusPath)
           
 void setUpdateInterval(long updateInterval)
           
 void setUser(String user)
           
 void setWebServerHost(String webServerHost)
           
 void setWebServerPort(int webServerPort)
           
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleRemoteConnector

public SimpleRemoteConnector()
Method Detail

getWebServerHost

public String getWebServerHost()

setWebServerHost

public void setWebServerHost(String webServerHost)

getWebServerPort

public int getWebServerPort()

setWebServerPort

public void setWebServerPort(int webServerPort)

getUpdateInterval

public long getUpdateInterval()

setUpdateInterval

public void setUpdateInterval(long updateInterval)

getUser

public String getUser()

setUser

public void setUser(String user)

getPass

public String getPass()

getDomain

public String getDomain()

setDomain

public void setDomain(String domain)

setPass

public void setPass(String pass)

getStatusPath

public String getStatusPath()

setStatusPath

public void setStatusPath(String statusPath)

getFilter

public String getFilter()

setFilter

public void setFilter(String filter)

destroy

public void destroy()

init

public void init()
          throws IOException

start

public void start()
           throws IOException

refresh

public void refresh()
Refresh the proxies, if updateInterval passed

refreshAttributes

public void refreshAttributes()

refreshMetadata

public void refreshMetadata()

invoke

public Object invoke(Object oname,
                     String name,
                     Object[] params,
                     String[] signature)
              throws javax.management.MBeanException,
                     javax.management.ReflectionException

setAttribute

public void setAttribute(javax.management.ObjectName oname,
                         javax.management.Attribute attribute)
                  throws javax.management.AttributeNotFoundException,
                         javax.management.MBeanException,
                         javax.management.ReflectionException

getStream

protected InputStream getStream(String qry)
                         throws Exception
connect to apache using http, get a list of mbeans. Can be overriten to support different protocols ( jk/Unix domain sockets, etc )


Copyright © 2002-2007 The Apache Software Foundation. All Rights Reserved.