Protocol components implement channels through which
iWay Service Manager gets messages and emits messages. The protocol
components are:
-
Listeners get
messages to be processed. They obtain their configuration information
from the properties stored when the server was configured. For synchronous,
correlated responses, they provide the associated emitter with the properties
needed to emit back to the source of the message. Listeners set
special registers to record information about the message, such
as header values, input source, and so on.
-
Emitters pass
messages out of the server. They obtain their configuration either
from the console by accessing the listener properties for synchronous
responses, or the replyto properties for non-correlated messages.
In addition, a business agent can set emitter properties explicitly
by loading a hash map with the properties to be used for a specific
message. Some emitters consult special registers to control their
activity or to further format the output. An example is HDR-level special
registers to set header values.
This chapter discusses technical details of writing and packaging
components, and is intended for a select audience of those well-versed
in Java and familiar with the architecture and implementation of
iWay Service Manager. Those preparing components are encouraged to
follow the design patterns in a current component. Some good ones
to look at are:
-
XDTickMaster represents
a listener that receives control from the XDManager class, which
maintains state for each protocol. Some masters are simply created
by the manager, while others are run in threads. For more information,
see XDTickMaster.
-
XDTickWorker represents
a listener that is controlled by the XDTickMaster. There is one
XDxxxWorker for each thread of execution or document that can be
handled in parallel. Each XDxxxWorker extends XDWorker, which manages
the processing sequence. For more information, see XDTickWorker.
All emitters follow the same pattern. The example shown in this
manual of the Line Handler follows the first pattern. The pattern
you select must be appropriate to the protocol.
This document is not intended to be a complete description of
writing components. Such work should be done in conjunction with
the iWay Service Manager development group. It does, however, provide
an overview of the work that must be done and how the pieces fit together.