This repository has been archived by the owner on Nov 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
114 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,5 @@ | |
]}, | ||
{registered, []}, | ||
{env, []}, | ||
{mod, {amqp_client, []}}, | ||
{applications, [kernel, stdlib]}]}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
%% The contents of this file are subject to the Mozilla Public License | ||
%% Version 1.1 (the "License"); you may not use this file except in | ||
%% compliance with the License. You may obtain a copy of the License at | ||
%% http://www.mozilla.org/MPL/ | ||
%% | ||
%% Software distributed under the License is distributed on an "AS IS" | ||
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | ||
%% License for the specific language governing rights and limitations | ||
%% under the License. | ||
%% | ||
%% The Original Code is the RabbitMQ Erlang Client. | ||
%% | ||
%% The Initial Developers of the Original Code are LShift Ltd., | ||
%% Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. | ||
%% | ||
%% Portions created by LShift Ltd., Cohesive Financial | ||
%% Technologies LLC., and Rabbit Technologies Ltd. are Copyright (C) | ||
%% 2007 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit | ||
%% Technologies Ltd.; | ||
%% | ||
%% All Rights Reserved. | ||
%% | ||
%% Contributor(s): ____________________. | ||
|
||
%% @private | ||
-module(amqp_client). | ||
|
||
-behaviour(application). | ||
|
||
-export([start/0]). | ||
-export([start/2, stop/1]). | ||
|
||
%%--------------------------------------------------------------------------- | ||
%% Interface | ||
%%--------------------------------------------------------------------------- | ||
|
||
start() -> | ||
application:start(amqp_client). | ||
|
||
%%--------------------------------------------------------------------------- | ||
%% application callbacks | ||
%%--------------------------------------------------------------------------- | ||
|
||
start(_StartType, _StartArgs) -> | ||
amqp_sup:start_link(). | ||
|
||
stop(_State) -> | ||
ok. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
%% The contents of this file are subject to the Mozilla Public License | ||
%% Version 1.1 (the "License"); you may not use this file except in | ||
%% compliance with the License. You may obtain a copy of the License at | ||
%% http://www.mozilla.org/MPL/ | ||
%% | ||
%% Software distributed under the License is distributed on an "AS IS" | ||
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | ||
%% License for the specific language governing rights and limitations | ||
%% under the License. | ||
%% | ||
%% The Original Code is the RabbitMQ Erlang Client. | ||
%% | ||
%% The Initial Developers of the Original Code are LShift Ltd., | ||
%% Cohesive Financial Technologies LLC., and Rabbit Technologies Ltd. | ||
%% | ||
%% Portions created by LShift Ltd., Cohesive Financial | ||
%% Technologies LLC., and Rabbit Technologies Ltd. are Copyright (C) | ||
%% 2007 LShift Ltd., Cohesive Financial Technologies LLC., and Rabbit | ||
%% Technologies Ltd.; | ||
%% | ||
%% All Rights Reserved. | ||
%% | ||
%% Contributor(s): ____________________. | ||
|
||
%% @private | ||
-module(amqp_sup). | ||
|
||
-include("amqp_client.hrl"). | ||
|
||
-behaviour(supervisor2). | ||
|
||
-export([start_link/0, start_connection_sup/2]). | ||
-export([init/1]). | ||
|
||
%%--------------------------------------------------------------------------- | ||
%% Interface | ||
%%--------------------------------------------------------------------------- | ||
|
||
start_link() -> | ||
supervisor2:start_link({local, amqp_sup}, ?MODULE, []). | ||
|
||
start_connection_sup(Type, AmqpParams) -> | ||
supervisor2:start_child(amqp_sup, [Type, AmqpParams]). | ||
|
||
%%--------------------------------------------------------------------------- | ||
%% supervisor2 callbacks | ||
%%--------------------------------------------------------------------------- | ||
|
||
init([]) -> | ||
{ok, {{simple_one_for_one_terminate, 0, 1}, | ||
[{connection_sup, {amqp_connection_sup, start_link, []}, | ||
temporary, infinity, supervisor, [amqp_connection_sup]}]}}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters