|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.cybernode.StaticCybernode
public class StaticCybernode
A simple container for instantiating service beans. This utility can be used to create a service bean either from a classname, or from an OperationalString document. If the latter is used, the service bean is created using the attributes contained within the OperationalString document.
The StaticCybernode returns the implementation (back-end) object for the service bean(s) that have been created. This allows direct manipulation of the implementation, allowing debugging and unit testing to occur easily.
Notes:
| Constructor Summary | |
|---|---|
StaticCybernode()
|
|
| Method Summary | |
|---|---|
Map<String,Object> |
activate(File opstring,
String... beans)
Activate service beans defined in an OperationalString document, scoping the beans to be activated by providing the bean names. |
Map<String,Object> |
activate(OperationalString opstring)
Activate all service beans defined in an OperationalString |
Map<String,Object> |
activate(OperationalString opstring,
String... beans)
Activate service beans defined in an OperationalString,
scoping the beans to be activated by providing the bean names. |
Object |
activate(String classname)
Activate a service bean. |
void |
destroy()
Shutdown & terminate the StaticCybernode |
Object |
getServiceProxy(Object impl)
Get the proxy for a service implementation created by the StaticCybernode |
static void |
main(String... args)
The StaticCybernode can be invoked directly from the command line. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StaticCybernode()
| Method Detail |
|---|
public void destroy()
public Object activate(String classname)
throws JSBInstantiationException
classname - The service bean class to create.
JSBInstantiationException - If the service bean cannot be created
public Map<String,Object> activate(File opstring,
String... beans)
throws Exception
opstring - The OperationalString documentbeans - The bean names to create. If not provided all
services in the opstring will be created
Exception - If the OperationalString document results in
parsing errors or the bean(s) cannot be created.
public Map<String,Object> activate(OperationalString opstring,
String... beans)
throws JSBInstantiationException
OperationalString,
scoping the beans to be activated by providing the bean names.
opstring - The OperationalString documentbeans - The bean names to create. If not provided all
services in the opstring will be created
JSBInstantiationException - If the bean(s) cannot be created.
public Map<String,Object> activate(OperationalString opstring)
throws JSBInstantiationException
OperationalString
opstring - The OperationalString document
JSBInstantiationException - If the bean(s) cannot be created.public Object getServiceProxy(Object impl)
impl - The service implementation, obtained through the
activate method
IllegalArgumentException - if the impl parameter is nullpublic static void main(String... args)
Invoking the StaticCybernode is done as follows:
Usage:
org.rioproject.cybernode.StaticCybernode service-class-name | opstring-file [bean-names]
The StaticCybernode takes either a
| Argument |
Description |
| service-class-name |
The fully qualified class name
of the service bean to instantiate. The service bean will be created
with an empty configuration |
| opstring-file |
The OperationalString document
(either .xml or .groovy) declaring service beans and service bean
attributes. |
| bean-names |
Optional comma-separated list of
beans to create within the provided opstring-file |
args - Either a service-class-name or the location of an
opstring-file with optional bean-names
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||