~ubuntu-branches/ubuntu/trusty/rabbitmq-server/trusty

« back to all changes in this revision

Viewing changes to plugins-src/rabbitmq-erlang-client/src/amqp_rpc_client.erl

  • Committer: Package Import Robot
  • Author(s): Emile Joubert
  • Date: 2013-08-15 15:24:15 UTC
  • mfrom: (0.5.6) (0.1.42 sid)
  • Revision ID: package-import@ubuntu.com-20130815152415-savq3fpv1vhou8eh
Tags: 3.1.5-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
%%
11
11
%% The Original Code is RabbitMQ.
12
12
%%
13
 
%% The Initial Developer of the Original Code is VMware, Inc.
14
 
%% Copyright (c) 2007-2013 VMware, Inc.  All rights reserved.
 
13
%% The Initial Developer of the Original Code is GoPivotal, Inc.
 
14
%% Copyright (c) 2007-2013 GoPivotal, Inc.  All rights reserved.
15
15
%%
16
16
 
17
17
%% @doc This module allows the simple execution of an asynchronous RPC over
25
25
 
26
26
-behaviour(gen_server).
27
27
 
28
 
-export([start/2, stop/1]).
 
28
-export([start/2, start_link/2, stop/1]).
29
29
-export([call/2]).
30
30
-export([init/1, terminate/2, code_change/3, handle_call/3,
31
31
         handle_cast/2, handle_info/2]).
53
53
    {ok, Pid} = gen_server:start(?MODULE, [Connection, Queue], []),
54
54
    Pid.
55
55
 
 
56
%% @spec (Connection, Queue) -> RpcClient
 
57
%% where
 
58
%%      Connection = pid()
 
59
%%      Queue = binary()
 
60
%%      RpcClient = pid()
 
61
%% @doc Starts, and links to, a new RPC client instance that sends requests
 
62
%% to a specified queue. This function returns the pid of the RPC client
 
63
%% process that can be used to invoke RPCs and stop the client.
 
64
start_link(Connection, Queue) ->
 
65
    {ok, Pid} = gen_server:start_link(?MODULE, [Connection, Queue], []),
 
66
    Pid.
 
67
 
56
68
%% @spec (RpcClient) -> ok
57
69
%% where
58
70
%%      RpcClient = pid()