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 )- Author:
- Costin Manolache
-
-
Constructor Summary
Constructors Constructor Description SimpleRemoteConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddestroy()StringgetDomain()StringgetFilter()StringgetPass()StringgetStatusPath()protected InputStreamgetStream(String qry)connect to apache using http, get a list of mbeans.longgetUpdateInterval()StringgetUser()StringgetWebServerHost()intgetWebServerPort()voidinit()Objectinvoke(Object oname, String name, Object[] params, String[] signature)voidrefresh()Refresh the proxies, if updateInterval passedvoidrefreshAttributes()voidrefreshMetadata()voidsetAttribute(ObjectName oname, Attribute attribute)voidsetDomain(String domain)voidsetFilter(String filter)voidsetPass(String pass)voidsetStatusPath(String statusPath)voidsetUpdateInterval(long updateInterval)voidsetUser(String user)voidsetWebServerHost(String webServerHost)voidsetWebServerPort(int webServerPort)voidstart()
-
-
-
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- Throws:
IOException
-
start
public void start() throws IOException- 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 MBeanException, ReflectionException
- Throws:
MBeanExceptionReflectionException
-
setAttribute
public void setAttribute(ObjectName oname, Attribute attribute) throws AttributeNotFoundException, MBeanException, 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 )- Throws:
Exception
-
-