removed managed=true from ManagedOperation and ManagedAttribute

This commit is contained in:
Jesse McConnell 2012-08-13 17:19:59 -05:00
parent 74f8822e64
commit aae7c4da68
12 changed files with 21 additions and 41 deletions

View File

@ -53,7 +53,7 @@ public class Derived extends Base implements Signature
return "bad";
}
@ManagedAttribute( value="sample managed object")
@ManagedAttribute("sample managed object")
public Managed getManagedInstance()
{
return managedInstance;

View File

@ -19,13 +19,13 @@ public class DerivedMBean extends ObjectMBean
super(managedObject);
}
@ManagedOperation(value="test of proxy operations", managed=true)
@ManagedOperation("test of proxy operations")
public String good()
{
return "not " + ((Derived)_managed).bad();
}
@ManagedAttribute(value="test of proxy attributes", getter="goop", proxied=true)
@ManagedAttribute(value="test of proxy attributes", proxied=true)
public String goop()
{
return "goop";

View File

@ -16,13 +16,13 @@ public class ManagedMBean extends ObjectMBean
super(managedObject);
}
@ManagedOperation(value="test of proxy operations", managed=true)
@ManagedOperation("test of proxy operations")
public String good()
{
return "not managed " + ((Managed)_managed).bad();
}
@ManagedAttribute(value="test of proxy attributes", getter="goop", proxied=true)
@ManagedAttribute(value="test of proxy attributes", proxied=true)
public String goop()
{
return "goop";

View File

@ -173,11 +173,13 @@ public class ObjectMBeanTest
Assert.assertNotNull(mbean.getMBeanInfo());
container.addBean(derived);
//container.addBean(derived.getManagedInstance());
container.addBean(derived.getManagedInstance());
container.addBean(mbean);
container.addBean(managed);
Managed managedInstance = (Managed)mbean.getAttribute("managedInstance");
Assert.assertNotNull(managedInstance);
Assert.assertEquals("managed instance returning nonsense", "foo", managedInstance.getManaged());
//Managed managedInstance = (Managed)mbean.getAttribute("managedInstance");
//Assert.assertNotNull(managedInstance);
//Assert.assertEquals("managed instance returning nonsense", "foo", managedInstance.getManaged());

View File

@ -31,14 +31,14 @@ public interface HandlerContainer extends LifeCycle
/**
* @return array of handlers directly contained by this handler.
*/
@ManagedAttribute(value="handlers in this container", managed=true)
@ManagedAttribute("handlers in this container")
public Handler[] getHandlers();
/* ------------------------------------------------------------ */
/**
* @return array of all handlers contained by this handler and it's children
*/
@ManagedAttribute(value="all contained handlers", managed=true)
@ManagedAttribute("all contained handlers")
public Handler[] getChildHandlers();
/* ------------------------------------------------------------ */

View File

@ -168,7 +168,7 @@ public class Server extends HandlerWrapper implements Attributes
/**
* @return Returns the connectors.
*/
@ManagedAttribute(value="connectors for this server", managed=true)
@ManagedAttribute("connectors for this server")
public Connector[] getConnectors()
{
List<Connector> connectors = new ArrayList<>(_connectors);
@ -222,7 +222,7 @@ public class Server extends HandlerWrapper implements Attributes
/**
* @return Returns the threadPool.
*/
@ManagedAttribute(value="the server thread pool", managed=true)
@ManagedAttribute("the server thread pool")
public ThreadPool getThreadPool()
{
return _threadPool;

View File

@ -1421,7 +1421,7 @@ public class ContextHandler extends ScopedHandler implements Attributes, Server.
/**
* @return Returns the errorHandler.
*/
@ManagedAttribute(value="The error handler to use for the context", managed=true)
@ManagedAttribute("The error handler to use for the context")
public ErrorHandler getErrorHandler()
{
return _errorHandler;

View File

@ -63,7 +63,7 @@ public class HandlerCollection extends AbstractHandlerContainer
* @return Returns the handlers.
*/
@Override
@ManagedAttribute(value="Wrapped handlers", managed=true)
@ManagedAttribute("Wrapped handlers")
public Handler[] getHandlers()
{
return _handlers;

View File

@ -36,7 +36,7 @@ public class ServerMBean extends ObjectMBean
server = (Server)managedObject;
}
@ManagedAttribute(value="contexts on this server", managed=true)
@ManagedAttribute("contexts on this server")
public Handler[] getContexts()
{
return server.getChildHandlersByClass(ContextHandler.class);

View File

@ -45,14 +45,7 @@ public @interface ManagedAttribute
* @return true if readonly
*/
boolean readonly() default false;
/**
* Is the managed field itself a Managed Object?
*
* @return true if the target is a Managed Object
*/
boolean managed() default false;
/**
* Does the managed field exist on a proxy object?
*
@ -61,13 +54,6 @@ public @interface ManagedAttribute
*/
boolean proxied() default false;
/**
* If is a field references a getter that doesn't conform to standards for discovery
* it can be set here.
*
* @return the full name of the getter in question
*/
String getter() default "";
/**
* If is a field references a setter that doesn't conform to standards for discovery

View File

@ -28,8 +28,7 @@ public @interface ManagedOperation
*
* @return
*/
String value() default "Not Specified";
String value() default "Not Specified";
/**
* The impact of an operation.
@ -42,13 +41,6 @@ public @interface ManagedOperation
*/
String impact() default "UNKNOWN";
/**
* Is the managed field itself a Managed Object?
*
* @return true if the target is a Managed Object
*/
boolean managed() default false;
/**
* Does the managed field exist on a proxy object?
*

View File

@ -290,7 +290,7 @@ public class Log
*
* @return a map of all configured {@link Logger} instances
*/
@ManagedAttribute(value="list of all instantiated loggers", managed=true)
@ManagedAttribute("list of all instantiated loggers")
public static Map<String, Logger> getLoggers()
{
return Collections.unmodifiableMap(__loggers);