1
%% The contents of this file are subject to the Mozilla Public License
2
%% Version 1.1 (the "License"); you may not use this file except in
3
%% compliance with the License. You may obtain a copy of the License
4
%% at http://www.mozilla.org/MPL/
6
%% Software distributed under the License is distributed on an "AS IS"
7
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
8
%% the License for the specific language governing rights and
9
%% limitations under the License.
11
%% The Original Code is RabbitMQ Federation.
13
%% The Initial Developer of the Original Code is VMware, Inc.
14
%% Copyright (c) 2007-2013 VMware, Inc. All rights reserved.
17
-module(rabbit_federation_old_sup).
19
-behaviour(supervisor).
21
%% Supervises everything. There is just one of these.
23
-include_lib("rabbit_common/include/rabbit.hrl").
24
-define(SUPERVISOR, rabbit_federation_old_sup).
26
-export([start_link/0]).
30
%% This supervisor needs to be part of the rabbit application since
31
%% a) it needs to be in place when exchange recovery takes place
32
%% b) it needs to go up and down with rabbit
34
-rabbit_boot_step({rabbit_federation_old_supervisor,
35
[{description, "federation_old"},
36
{mfa, {rabbit_sup, start_child, [?MODULE]}},
37
{requires, kernel_ready},
38
{enables, rabbit_federation_old_exchange}]}).
40
%%----------------------------------------------------------------------------
43
supervisor:start_link({local, ?SUPERVISOR}, ?MODULE, []).
45
%%----------------------------------------------------------------------------
48
Status = {status, {rabbit_federation_old_status, start_link, []},
49
transient, ?MAX_WAIT, worker,
50
[rabbit_federation_old_status]},
51
LinkSupSup = {links, {rabbit_federation_old_link_sup_sup, start_link, []},
52
transient, ?MAX_WAIT, supervisor,
53
[rabbit_federation_old_link_sup_sup]},
54
{ok, {{one_for_one, 3, 10}, [Status, LinkSupSup]}}.