|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.MBeanBroker
org.norther.tammi.core.config.MBeanConfig
org.norther.tammi.spray.engine.tool.BrokerTool
public class BrokerTool
A request context tool extending MBeanConfig and pushing exceptions into the error stack of the filter chain instead of throwing them.
| Field Summary |
|---|
| Fields inherited from class org.norther.tammi.core.base.MBeanBroker |
|---|
MBEAN_BROKER |
| Constructor Summary | |
|---|---|
BrokerTool()
Constructs a new broker. |
|
| Method Summary | |
|---|---|
void |
configure(ObjectName name,
String path)
Configures the specified MBean. |
void |
configure(String spec,
String path)
Configures the specified MBean. |
void |
copy(File source,
File target)
Copies a file. |
void |
copy(URL source,
File target)
Copies a URL. |
ObjectName |
create(String clazz,
ObjectName name,
ObjectName loader,
Object params,
Object sign)
Creates and registers an MBean with an object name, class loader, parameters and signature. |
ObjectName |
create(String className,
String name,
String loader,
Object params,
Object sign)
Creates and registers an MBean with a string name, class loader, parameters and signature. |
void |
dispose()
Disposes the object after use. |
void |
disposed()
A call back indicating that this instance is not needed any more and can be disposed. |
Object |
get(ObjectName name,
String key)
Gets an attribute value of the specified MBean. |
String |
getClassName(ObjectName name)
Gets the class name of the specified MBean. |
protected HttpFilterChain |
getFilterChain()
Gets the current filter chain if available. |
MBeanInfo |
getInfo(ObjectName name)
Gets MBean info about the specified MBean. |
String |
getSystemProperty(String name)
Gets a system property. |
Object |
instantiate(String clazz,
Object params,
Object sign)
Intantiates an object with parameters and a signature. |
Object |
invoke(ObjectName name,
String method,
Object params,
Object sign)
Invokes a method of the specified MBean with parameters and a signature. |
protected boolean |
isBound()
Gets the bound state. |
boolean |
isDisposed()
Checks whether the recyclable has been disposed. |
Class |
load(String className)
Loads a class. |
void |
recycle()
Recycles the object for a new client. |
void |
recycled(MBeanReference instance)
A callback specifying the pool, from which this instance was recycled. |
ObjectName |
register(Object object,
ObjectName name)
Registers the named MBean. |
ObjectName |
register(Object object,
String name)
Registers an MBean with a string name. |
void |
restart(int delay)
Restarts the server. |
void |
set(ObjectName name,
String key,
Object value)
Sets an attribute value of the specified MBean. |
void |
setSystemProperty(String name,
String value)
Sets a system property. |
void |
shutdown()
Shuts down the server. |
ObjectName |
toObjectName(String name)
Converts a string to an object name. |
void |
unregister(ObjectName name)
Unregisters the named MBean. |
void |
valueBound(ContextBindingEvent event)
Notifies the object that it is being bound to a context. |
void |
valueUnbound(ContextBindingEvent event)
Notifies the object that it is being unbound from a context. |
| Methods inherited from class org.norther.tammi.core.config.MBeanConfig |
|---|
configure, configure, convert, convert, getConfigurator, setConverter, setConverter |
| Methods inherited from class org.norther.tammi.core.base.MBeanBroker |
|---|
adapt, adapt, adapt, adapt, adapt, adapt, adapt, adapt, adapt, adapt, adapt, create, create, create, create, create, create, create, find, find, find, find, findName, findName, findName, findName, findNames, findNames, findNames, findNames, findNames, findNames, get, get, get, getAllDomains, getBroker, getClassName, getDefaultDomain, getDomain, getDomainName, getDomainNames, getFactory, getInfo, getLoader, getLog, getMBeanServer, getPackage, getPackages, instantiate, instantiate, invoke, invoke, invoke, invoke, invoke, isDefined, isInstanceOf, isInstanceOf, isRegistered, isRegistered, register, register, set, set, set, set, set, setAlias, setAlias, setFactory, setFactory, setMBeanServer, toPackageName, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BrokerTool()
| Method Detail |
|---|
public void recycle()
Recyclable
recycle in interface Recyclablepublic void dispose()
Recyclable
dispose in interface Recyclablepublic boolean isDisposed()
Recyclable
isDisposed in interface Recyclablepublic void recycled(MBeanReference instance)
Poolable
recycled in interface Poolableinstance - the pool MBean reference.public void disposed()
Poolable
disposed in interface Poolable
public ObjectName create(String className,
String name,
String loader,
Object params,
Object sign)
throws LogException
MBeanBrokernull or also a
list.
create in class MBeanBrokerclassName - the class name of the MBean.name - the string name of the MBean.loader - the string name of the loader.params - the parameter to the constructor.sign - the signature of the parameters.
LogException - on errors.
public ObjectName register(Object object,
String name)
throws LogException
MBeanBroker
register in class MBeanBrokerobject - the object to register.name - the string name of the MBean.
LogException - on errors.
public void configure(String spec,
String path)
MBeanConfig
configure in class MBeanConfigspec - the MBean specification.path - the configuration path.
public String getClassName(ObjectName name)
throws LogException
MBeanBroker
getClassName in class MBeanBrokername - the object name of the MBean.
LogException - on errors.public MBeanInfo getInfo(ObjectName name)
MBeanBroker
getInfo in class MBeanBrokername - the object name of the MBean.
public Object get(ObjectName name,
String key)
MBeanBroker
get in class MBeanBrokername - the object name of the MBean.key - the attribute key.
public void set(ObjectName name,
String key,
Object value)
MBeanBroker
set in class MBeanBrokername - the MBean name.key - the attribute key.value - the attribute value.
public Object invoke(ObjectName name,
String method,
Object params,
Object sign)
MBeanBrokernull or also a list.
invoke in class MBeanBrokername - the MBean name.method - the method name.params - the parameters to the method.sign - the signature of the parameters.
public ObjectName create(String clazz,
ObjectName name,
ObjectName loader,
Object params,
Object sign)
MBeanBrokernull or also a
list.
create in class MBeanBrokerclazz - the class name of the MBean.name - the object name of the MBean.loader - the object name of the loader.params - the parameter to the constructor.sign - the signature of the parameters.
public ObjectName register(Object object,
ObjectName name)
MBeanBroker
register in class MBeanBrokerobject - the object to register.name - the object name or name pattern of the MBean.
public void unregister(ObjectName name)
MBeanBroker
unregister in class MBeanBrokername - the object name of the MBean.
public void configure(ObjectName name,
String path)
MBeanConfig
configure in class MBeanConfigname - the object name of the MBean.path - the configuration path.
public Object instantiate(String clazz,
Object params,
Object sign)
MBeanBroker
instantiate in class MBeanBrokerclazz - the class name of the object.params - the parameters to the constructor.sign - the signature of the parameters.
public ObjectName toObjectName(String name)
MBeanBroker
toObjectName in class MBeanBrokername - the string.
public String getSystemProperty(String name)
MBeanBroker
getSystemProperty in class MBeanBrokername - the property name.
public void setSystemProperty(String name,
String value)
MBeanBroker
setSystemProperty in class MBeanBrokername - the property name.value - the property value.public Class load(String className)
MBeanBroker
load in class MBeanBrokerclassName - the class name.
public void copy(File source,
File target)
copy in class MBeanConfigsource - the source file.target - the target file.
public void copy(URL source,
File target)
copy in class MBeanConfigsource - the source URL.target - the target file.public void shutdown()
public void restart(int delay)
delay - the restart delay in secs.public void valueBound(ContextBindingEvent event)
ContextBindingListener
valueBound in interface ContextBindingListenerevent - the binding event.public void valueUnbound(ContextBindingEvent event)
ContextBindingListener
valueUnbound in interface ContextBindingListenerevent - the binding event.protected HttpFilterChain getFilterChain()
protected boolean isBound()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||