~ubuntu-branches/debian/squeeze/erlang/squeeze

« back to all changes in this revision

Viewing changes to lib/inets/src/http_client/httpc_handler_sup.erl

  • Committer: Bazaar Package Importer
  • Author(s): Sergei Golovan
  • Date: 2010-03-09 17:34:57 UTC
  • mfrom: (10.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100309173457-4yd6hlcb2osfhx31
Tags: 1:13.b.4-dfsg-3
Manpages in section 1 are needed even if only arch-dependent packages are
built. So, re-enabled them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
%%
2
2
%% %CopyrightBegin%
3
 
%% 
4
 
%% Copyright Ericsson AB 2007-2009. All Rights Reserved.
5
 
%% 
 
3
%%
 
4
%% Copyright Ericsson AB 2007-2010. All Rights Reserved.
 
5
%%
6
6
%% The contents of this file are subject to the Erlang Public License,
7
7
%% Version 1.1, (the "License"); you may not use this file except in
8
8
%% compliance with the License. You should have received a copy of the
9
9
%% Erlang Public License along with this software. If not, it can be
10
10
%% retrieved online at http://www.erlang.org/.
11
 
%% 
 
11
%%
12
12
%% Software distributed under the License is distributed on an "AS IS"
13
13
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
14
14
%% the License for the specific language governing rights and limitations
15
15
%% under the License.
16
 
%% 
 
16
%%
17
17
%% %CopyrightEnd%
18
18
%%
19
19
%%
23
23
 
24
24
%% API
25
25
-export([start_link/0]).
26
 
-export([start_child/1]).
 
26
-export([start_child/2]).
27
27
 
28
28
%% Supervisor callback
29
29
-export([init/1]).
34
34
start_link() ->
35
35
    supervisor:start_link({local, ?MODULE}, ?MODULE, []).
36
36
 
37
 
start_child(Args) ->
 
37
start_child(Options, Profile) ->
 
38
    Args = [Options, Profile], 
38
39
    supervisor:start_child(?MODULE, Args).
39
 
    
 
40
 
 
41
 
40
42
%%%=========================================================================
41
43
%%%  Supervisor callback
42
44
%%%=========================================================================
43
45
init(Args) ->
 
46
 
44
47
    RestartStrategy = simple_one_for_one,
45
48
    MaxR = 0,
46
49
    MaxT = 3600,
47
50
   
48
 
    Name = undefined, % As simple_one_for_one is used.
 
51
    Name      = undefined, % As simple_one_for_one is used.
49
52
    StartFunc = {httpc_handler, start_link, Args},
50
 
    Restart = temporary, % E.g. should not be restarted
51
 
    Shutdown = 4000,
52
 
    Modules = [httpc_handler],
53
 
    Type = worker,
54
 
    
 
53
    Restart   = temporary, % E.g. should not be restarted
 
54
    Shutdown  = 4000,
 
55
    Modules   = [httpc_handler],
 
56
    Type      = worker,
55
57
    ChildSpec = {Name, StartFunc, Restart, Shutdown, Type, Modules},
 
58
 
56
59
    {ok, {{RestartStrategy, MaxR, MaxT}, [ChildSpec]}}.
57
60
 
58
61