org.apache.commons.modeler.mbeans
Class SimpleRemoteConnector
java.lang.Object
org.apache.commons.modeler.mbeans.SimpleRemoteConnector
public class SimpleRemoteConnector
- extends java.lang.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 )
- Author:
- Costin Manolache
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleRemoteConnector
public SimpleRemoteConnector()
getWebServerHost
public java.lang.String getWebServerHost()
setWebServerHost
public void setWebServerHost(java.lang.String webServerHost)
getWebServerPort
public int getWebServerPort()
setWebServerPort
public void setWebServerPort(int webServerPort)
getUpdateInterval
public long getUpdateInterval()
setUpdateInterval
public void setUpdateInterval(long updateInterval)
getUser
public java.lang.String getUser()
setUser
public void setUser(java.lang.String user)
getPass
public java.lang.String getPass()
getDomain
public java.lang.String getDomain()
setDomain
public void setDomain(java.lang.String domain)
setPass
public void setPass(java.lang.String pass)
getStatusPath
public java.lang.String getStatusPath()
setStatusPath
public void setStatusPath(java.lang.String statusPath)
getFilter
public java.lang.String getFilter()
setFilter
public void setFilter(java.lang.String filter)
destroy
public void destroy()
init
public void init()
throws java.io.IOException
- Throws:
java.io.IOException
start
public void start()
throws java.io.IOException
- Throws:
java.io.IOException
refresh
public void refresh()
- Refresh the proxies, if updateInterval passed
refreshAttributes
public void refreshAttributes()
refreshMetadata
public void refreshMetadata()
invoke
public java.lang.Object invoke(java.lang.Object oname,
java.lang.String name,
java.lang.Object[] params,
java.lang.String[] signature)
throws javax.management.MBeanException,
javax.management.ReflectionException
- 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
- Throws:
javax.management.AttributeNotFoundException
javax.management.MBeanException
javax.management.ReflectionException
getStream
protected java.io.InputStream getStream(java.lang.String qry)
throws java.lang.Exception
- connect to apache using http, get a list of mbeans. Can be
overriten to support different protocols ( jk/Unix domain sockets, etc )
- Throws:
java.lang.Exception
Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.