ZMQ::Declare::Application - A ZMQ::Declare Application object
use ZMQ::Declare; # See synopsis for ZMQ::Declare
A ZMQ::Declare::Application object represents any number of 0MQ devices that share the same 0MQ threading context. As such, an application conceptually maps to a single process.
ZMQ::Declare::Application
These are accessible with normal mutator methods.
The name of the application. This is required to be unique in a ZDCF file.
Read-only.
A reference to the underlying ZDCF specification object.
Constructor taking named arguments (see properties above). Typically, you should obtain your ZMQ::Declare::Application objects by calling application($application_name) on a ZMQ::Declare::ZDCF object instead of using new().
application($application_name)
new()
Given a device name, creates a ZMQ::Declare::Device object from the information stored in the application and returns that object.
This ZMQ::Declare::Device object is what you can use to actually implement 0MQ devices that are configured through ZDCF. Note that creating a ZMQ::Declare::Device object does not create any 0MQ contexts, sockets, or connections yet, you need to call make_runtime() or run() on the device for that.
ZMQ::Declare::Device
make_runtime()
run()
As a convenience, the device name defaults to the application name if none is provided. This is to cater to the cases of simple applications that have only one device that needs not have a different name than the application itself.
Returns a list (not a reference) of device names that are known to the application.
Creates a ZeroMQ::Context object from the application and returns it. In other words, this creates the actual threading context of 0MQ. Generally, this is called indirectly by using the device method to obtain a ZMQ::Declare::Device object and then calling the run or make_runtime methods on that.
device
run
make_runtime
Repeated calls to get_context will return the same threading context object.
get_context
ZeroMQ
ZMQ::Declare::ZDCF, ZMQ::Declare::Device
Steffen Mueller <smueller@cpan.org>
Copyright (C) 2011,2012 by Steffen Mueller
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.1 or, at your option, any later version of Perl 5 you may have available.
To install ZMQ::Declare, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ZMQ::Declare
CPAN shell
perl -MCPAN -e shell install ZMQ::Declare
For more information on module installation, please visit the detailed CPAN module installation guide.