Package Reference¶
broker¶
broker.py is a Python interface to Webmethods EntireX Broker
The module loads the EntireX Broker stub:
broker.dll for 64-bit Python otherwise broker32.dll (on Windows)
libbroker.so shared library (on Unix)
broker.py defines the Broker class using the Advanced Communication interface (ACI) for communicating with the EntireX broker.
-
class
adapya.entirex.broker.
Broker
(broker_id='localhost', user_id='monty', token=None, receive_length=2048, send_length=2048)[source]¶ Defines the essential Broker ACI functions using the Etbcb. For reference see EntireX Broker ACI Programming.
-
endConversation
(option=0)[source]¶ A client or server can terminate one or more conversations. This is the EOC function in ACI terms
-
-
exception
adapya.entirex.broker.
BrokerError
(value, etb)[source]¶ Subclass of BrokerException for Broker Error Responses
-
exception
adapya.entirex.broker.
BrokerException
(value, etb)[source]¶ Instance will have set the following values:
self.value is the EXX Broker response string
- self.etb is the Broker ACI call parameters that were used when
the error occurred
Example on how to call it:
try: raise BrokerException(value,etb) except BrokerException as e: adalog.warning('BrokerException', e.value, e.__class__) dump(e.etb.error_buffer,log=adalog.warning)
-
exception
adapya.entirex.broker.
BrokerTimeOut
(value, etb)[source]¶ Subclass of BrokerException for timeouts of requests to Broker
-
class
adapya.entirex.broker.
Etbcb
(send_length=0, receive_length=0, use_api_version=7, **kw)[source]¶ Defines Broker control block with its attributes and Broker call()
cmdinfo¶
cmdinfo.py interface to Webmethods EntireX Broker CIS Services and service explorer
Only a selection of the available fields is shown (see _FIELDS)
This covers the Broker API for Command and Information Services V9.7
Usage: cmdinfo [options]
Options:
-h, --help display this help
-b, --broker .. id of broker ETBxxxxx or hostname:port
-c, --class .. Broker server class (selector)
-d --detail info request detailed conversation/uows
-n, --name .. Broker server name (selector)
-k, --token .. Token
-m, --maxinfo .. Receive buffer length - default 32768
-o, --option .. Option: QUIESCE, IMMED (first char suffices)
-p, --puid Physical user id (selector)
-q, --seqno <int> Sequence number (selector)
-s, --service .. Broker service (selector)
short: -s class/server/service
-i, --infouid .. user id for broker communication
-u, --userid .. user id for information on active clients (selector)
-v, --convid .. conversation id (selector)
-w, --uowid .. unit of work (selector)
-x, --password .. password
-t, --trace .. sum of trace flags
1 - dump buffers before Broker call
2 - after call
4 - print broker calls, short and data
8 - detailed print of buffers
CIS commands (default command: info)
-S, --shutdown needs parameters convid or service or seqno (for server)
or userid/puid/token for client
-P, --purge <uowid> psf remove uow from persistent store
-T, --btrace <level> Broker trace on level 1-8, 0 switch off
Example:
1. show all services for broker class REPTOR and server MMSERV
and related conversations, units of work and servers;
show clients starting with userid MM
show general broker information first::
> cmdinfo -b zos3:3800 -u MM -s REPTOR/MMSERV/*
2. shutdown a participant identified by userid, service and/or conversation::
> cmdinfo -b zos3:3800 -Su OUT4_Reader
-Ss REPTOR/MMSERV/OUT4
-Sv 1290000000000105
-
exception
adapya.entirex.cmdinfo.
CISError
(value, epa)[source]¶ - Example use:
- try:
info = cis.iget(…)
- except CISError as e:
- if e.epa.cishdr.error_code == x:
print(‘
- CIS error: %s on %s/%s/%s’ %(e.value,
sv.server_class,sv.server,sv.service))