class type container =object..end
Containers encapsulate the control flow of the service components. A container is run in a separate thread or process.
Thread safety: All methods except start can be called from
any thread, and provide full thread safety.
method socket_service_name : string
method socket_service : socket_service
method container_id : container_idReturn the container ID
method ptype : parallelization_typeThe parallelization type actually used for this container
method event_system : Unixqueue.unix_event_systemThe event system the container uses
method start : extfd -> extfd -> unitInternal Method. Called by the controller to start the container.
It is the responsibility of the container to call the
post_start_hook and the pre_finish_hook.
The file descriptors are endpoints of RPC connections to the
controller. The first serves calls of the Control program,
and the second serves calls of the System program.
When start returns the container will be terminated.
method shutdown : unit -> unitInitiates a shutdown of the container.
method n_connections : intThe current number of connections
method n_total : intThe sum of all connections so far
method system : Rpc_client.tAn RPC client that can be used to send messages to the controller.
Only available while start is running. It is bound to
System.V1.
In multi-threaded programs access to system must be governed
by system_monitor. See Uq_mt for details what this means.
method system_monitor : Uq_mt.monitorThe thread monitor protecting the system RPC client
method lookup : string -> string -> string optionlookup service_name protocol_name tries to find a Unix domain
socket for the service and returns it.
method lookup_container_sockets : string -> string -> string arraylookup_container_sockets service_name protocol_name: returns
the Unix Domain paths of all container sockets for this service and
protocol. These are the sockets declared with address type
"container" in the config file.
method owned_container_sockets : (string * string) listList of pairs (protocol_name, path) of all container sockets
of this container
method send_message : string -> string -> string array -> unitsend_message service_pattern msg_name msg_arguments: Sends
a message to all services and message receivers matching
service_pattern. The pattern may include the wildcard *.
See the Netplex_types.controller.send_message method for
the notification guarantees.
method log : level -> string -> unitSends a log message to the controller.
method log_subch : string -> level -> string -> unitSends a log message to the controller. The first string is the subchannel
method update_detail : Unix.file_descr -> string -> unitUpdate the detail string output for the netplex.connections
admin message
method var : string -> param_value_or_anyReturns the value of a container variable or Not_found. Container
variables can be used by the user of a container to store additional
values in the container. These values exist once per thread/process.
method set_var : string -> param_value_or_any -> unitSets the value of a container variable
method call_plugin : plugin -> string -> Netxdr.xdr_value -> Netxdr.xdr_valuecall_plugin p procname procarg: This method can be called
from the container context to invoke the plugin p procedure
procname. This means that the ctrl_receive_call of the
same plugin is invoked in the controller context.
method activate_lever : int -> encap -> encapRuns a lever function registered in the controller. The int
argument identifies the lever. The encap argument is the parameter,
and the returned exception is the result. See also
Netplex_cenv.Make_lever for a convenient way to create
and use levers.
method startup_directory : stringThe current directory at Netplex startup time (same view as controller)