Group
Extension

Matches 5

Net-Async-AMQP ( T/TE/TEAM/Net-Async-AMQP-2.000.tar.gz, TEAM, 2016; MetaCPAN )
Net-Async-AMQP/lib/Net/Async/AMQP/Channel.pod ( view source; MetaCPAN )
',
   password => 'guest',
 )->then(sub {
  shift->open_channel->publish(
   type => 'application/json'
  )
 });

=head1 DESCRIPTION

Each Net::Async::AMQP::Channel instance represents a virtual chann
Net-Async-AMQP ( T/TE/TEAM/Net-Async-AMQP-2.000.tar.gz, TEAM, 2016; MetaCPAN )
Net-Async-AMQP/lib/Net/Async/AMQP/RPC/Server.pm ( view source; MetaCPAN )
head2 json

Returns a L<JSON::MaybeXS> object, for ->encode and ->decode support. This will load L<JSON::MaybeXS> on first call.

=cut

sub json {
	shift->{json} //= do {
		eval {
			require JSON::May
beXS;
		} or die "JSON RPC support requires the JSON::MaybeXS module, which could not be loaded:\n$@";
		JSON::MaybeXS->new
	}
}

=head2 process_message

Called when there is a message to process. Rec
y ($self, %args) = @_;
	$log->debugf("Have message: %s", join ' ', %args);
	if(my $code = $self->{json_handler}{$args{type}}) {
		# Run the code, and upgrade to a Future if necessary - we accept immed
Net-Async-AMQP ( T/TE/TEAM/Net-Async-AMQP-2.000.tar.gz, TEAM, 2016; MetaCPAN )
Net-Async-AMQP/lib/Net/Async/AMQP/RPC/Server.pod ( view source; MetaCPAN )
server L<Net::Async::AMQP::Queue> instance.

=head2 json

Returns a L<JSON::MaybeXS> object, for ->encode and ->decode support. This will load L<JSON::MaybeXS> on first call.

=head2 process_message

everal named parameters:

=head2 configure

Applies configuration:

=over 4

=item * json_handler - defines the JSON handlers for each type

=item * handler - defines default handlers

=back

=head1 I
Net-Async-AMQP ( T/TE/TEAM/Net-Async-AMQP-2.000.tar.gz, TEAM, 2016; MetaCPAN )
Net-Async-AMQP/lib/Net/Async/AMQP/RPC/Client.pm ( view source; MetaCPAN )

			$f
		});
	});
}

my $json;
sub json_request {
	my ($self, $cmd, $args) = @_;
	$json ||= do {
		eval {
			require JSON::MaybeXS;
		} or die "->json_request requires the JSON::MaybeXS module, which 
n$@";
		$json = JSON::MaybeXS->new;
	};
	$self->request(
		$cmd,
		$json->encode($args),
		content_type => 'application/json',
	)->then(sub {
		my $data = shift;
		eval {
			Future->done($json->decode
($data))
		} or do {
			Future->fail("Invalid JSON data: " . $data);
		}
	});
}

sub process_message {
	my ($self, %args) = @_;
	# $log->infof("Have message: %s", join ' ', %args);
	if(my $item = $sel
Net-Async-AMQP ( T/TE/TEAM/Net-Async-AMQP-2.000.tar.gz, TEAM, 2016; MetaCPAN )
Net-Async-AMQP/lib/Net/Async/AMQP/Channel.pm ( view source; MetaCPAN )
',
   password => 'guest',
 )->then(sub {
  shift->open_channel->publish(
   type => 'application/json'
  )
 });

=head1 DESCRIPTION

Each Net::Async::AMQP::Channel instance represents a virtual chann

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.