Class SimpleRemoteConnector
java.lang.Object
org.apache.commons.modeler.mbeans.SimpleRemoteConnector
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
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) String
(package private) String
(package private) long
(package private) String
private static org.apache.commons.logging.Log
(package private) HashMap
(package private) MBeanServer
(package private) String
(package private) String
(package private) Registry
(package private) String
(package private) long
(package private) String
(package private) String
(package private) int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
destroy()
getPass()
protected InputStream
connect to apache using http, get a list of mbeans.long
getUser()
int
void
init()
void
refresh()
Refresh the proxies, if updateInterval passedvoid
void
void
setAttribute
(ObjectName oname, Attribute attribute) void
void
void
void
setStatusPath
(String statusPath) void
setUpdateInterval
(long updateInterval) void
void
setWebServerHost
(String webServerHost) void
setWebServerPort
(int webServerPort) void
start()
-
Field Details
-
log
private static org.apache.commons.logging.Log log -
webServerHost
String webServerHost -
webServerPort
int webServerPort -
statusPath
String statusPath -
user
String user -
pass
String pass -
domain
String domain -
localDomain
String localDomain -
filter
String filter -
lastRefresh
long lastRefresh -
updateInterval
long updateInterval -
prefix
String prefix -
reg
Registry reg -
mserver
MBeanServer mserver -
mbeans
HashMap mbeans
-
-
Constructor Details
-
SimpleRemoteConnector
public SimpleRemoteConnector()
-
-
Method Details
-
getWebServerHost
-
setWebServerHost
-
getWebServerPort
public int getWebServerPort() -
setWebServerPort
public void setWebServerPort(int webServerPort) -
getUpdateInterval
public long getUpdateInterval() -
setUpdateInterval
public void setUpdateInterval(long updateInterval) -
getUser
-
setUser
-
getPass
-
getDomain
-
setDomain
-
setPass
-
getStatusPath
-
setStatusPath
-
getFilter
-
setFilter
-
destroy
public void destroy() -
init
- Throws:
IOException
-
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 MBeanException, ReflectionException - Throws:
MBeanException
ReflectionException
-
setAttribute
public void setAttribute(ObjectName oname, Attribute attribute) throws AttributeNotFoundException, MBeanException, ReflectionException -
getStream
connect to apache using http, get a list of mbeans. Can be overriten to support different protocols ( jk/Unix domain sockets, etc )- Throws:
Exception
-