1 import Application
2 import AGLP/Gateway
3
4 Class DegasServerApplication -superclass Application
5
6 #------------------------------------------------------------------
7 # DegasServerApplication constructor
8 #
9 # purpose : initialize the Degas server. It creates a new ALM for
10 # listening to client request.
11 # input : argv - program arguments from command line
12 # output : none
13 #------------------------------------------------------------------
14
15 DegasServerApplication public init {argv} {
16 set options [$self options]
17 $self init_args $options
18 $self init_resources $options
19 $options parse_args $argv
20
21 $self next "DegasServer"
22
23 # member : degas_ctrl_session_spec_
24 # The session specification for announce listen channel.
25
26 $self instvar degas_ctrl_session_spec_ resmgr_
27 set degas_ctrl_session_spec_ [$self get_option degasCtrlSessionSpec]
28 puts "Degas Server started :"
29 puts "Control Session : $degas_ctrl_session_spec_"
30
31 set alm [new AGLP/Gateway $degas_ctrl_session_spec_ 4096]
32 set resmgr_ [new DegasResourceManager]
33 }
34
35 #------------------------------------------------------------------
36 # DegasServerApplication::init_args
37 #
38 # purpose : Initialize command line arguments options
39 # input : The application's Option object for registering options
40 # output : none
41 #------------------------------------------------------------------
42
43 DegasServerApplication private init_args {options} {
44 $self next $options
45 $options register_option -dc degasCtrlSessionSpec
46 $options register_option -degasCtrlSessionSpec degasCtrlSessionSpec
47 $options register_option -ai aliveInterval
48 $options register_option -aliveInterval aliveInterval
49 $options register_option -at aliveTimeout
50 $options register_option -aliveTimeout aliveTimeout
51 $options register_option -st servableTimeout
52 $options register_option -servableTimeout servableTimeout
53 $options register_option -minPort minPort
54 $options register_option -maxPort maxPort
55 $options register_option -ttl ttl
56 $options register_option -debug debug
57 $options register_option -noReplace noReplace
58 $options register_option -serveOnly serveOnly
59 $options register_option -so serveOnly
60 }
61
62
63 #------------------------------------------------------------------
64 # DegasServerApplication::init_resources
65 #
66 # purpose : Initialize default values of arguments
67 # input : The application Option object
68 # output : none
69 #------------------------------------------------------------------
70
71 DegasServerApplication private init_resources {options} {
72 $self next $options
73 $options add_default degasCtrlSessionSpec 224.10.85.29/40000/32
74 $options add_default aliveTimeout 5000
75 $options add_default aliveInterval 2000
76 $options add_default servableTimeout 5000
77 $options add_default ttl 32
78 $options add_default minPort 30000
79 $options add_default maxPort 30500
80 $options add_default debug 1
81 $options add_default serveOnly ""
82 }
83
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.