BTT invoker provides an XML-based invocation framework.
The following diagram shows the BTT invoker working mechanism:
InvokerFactory is an instance factory, which have a lot of instances and
copies in memory. Each InvokerFactory represents one XML definition. You can
query Invoker Instance from factory by the ID defined in the XML.
An invoker instance is created by an InvokerFactory.createInvoker(String)
method. The invoker instance has all the parameters, structures and necessary
properties inside it’s’ instance.
You can define default parameter values inside the definitions or you can
specify it at runtime. For POJO, EJB and WS invokers, these parameters might
be the real parameter of the method; for user extended invoker or asynchronized
invoker, these parameters might be some useful informations .
The typical invocation step is as follows:
- Get invoker instance from InvokerFactory using invokerId
- Construct an object array as the invoker parameter. You can build an object
array directly or you can use the invoker utility class to construct the object
array.
- Call the invoker.execute method to invoke an invoker. The object array
is input as parameter.
The invoker has the following enhancements:
- Needs no manual coding
- Supports all popular technologies
- Supports both synchronized and asynchronized invocation
- Supports self-defined programming model
BTT Invoker has the following features:
- Speeds up development:
- You do not need to write invocation for each request.
- You are not required to learn the technologies to invoke other services.
- You can only change the definition's type if you want to test different
targets.
- No centralized management is required.
- Speeds up deployment: You can change the invoker to different target only
by changing the XML definition.