1 import Dp
2 import Application
3 import MashRemoteObject
4 Class IndivaClientApplication -superclass Application
5
6 IndivaClientApplication instproc init { argv name } {
7 set o [$self options]
8 $self init_resources $o
9 $self init_args $o
10
11 $o register_option "-imgr" "imgr"
12 $o add_default "imgr" ""
13
14 $self set argv_ [$o parse_args $argv]
15
16 # Open RPC Connection to Indiva Manager
17 $self instvar imgr_rpc_
18 if {[$self get_option imgr] != ""} {
19 set list [split [$self get_option imgr] :]
20 set host [lindex $list 0]
21 set port [lindex $list 1]
22 } elseif {[info exists ::env(INDIVA_MANAGER)]} {
23 set list [split $::env(INDIVA_MANAGER) :]
24 set host [lindex $list 0]
25 set port [lindex $list 1]
26 }
27 if {[catch {dp_MakeRPCClient $host $port} imgr_rpc_]} {
28 puts "WARNING: unable to connect to indiva manager at $host:$port"
29 puts "$imgr_rpc_"
30 set imgr_rpc_ ""
31 } else {
32 # Create a remote IndivaManager object.
33 $self set manager_ [new MashRemoteObject $imgr_rpc_ new IndivaManager]
34 }
35
36 $self next $name
37 }
38
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.