home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
csserverno.tcl
< prev
next >
Wrap
Text File
|
1996-10-18
|
4KB
|
121 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1996
#
# File: @(#)csserverno.tcl /main/hindenburg/11
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)csserverno.tcl /main/hindenburg/11 18 Oct 1996 Copyright 1996 Cayenne Software Inc.
# Start user added include file section
require csclientno.tcl
require csparamdia.tcl
# End user added include file section
require "csprocessn.tcl"
Class CSServerNode : {CSProcessNode} {
constructor
method destructor
method childName
method changeParameters
method changeableParameters
method shutdown
method doUpdate
attribute server
attribute paramDialog
}
constructor CSServerNode {class this name i_server} {
set this [CSProcessNode::constructor $class $this $name]
$this server $i_server
# Start constructor user section
$this process $i_server
$this label [$i_server name]
$this icon rep_dbsrv_16
$this canChangeParams 1
$this canShutdown 1
$this activated "$this changeParameters"
# End constructor user section
return $this
}
method CSServerNode::destructor {this} {
# Start destructor user section
# End destructor user section
$this CSProcessNode::destructor
}
method CSServerNode::childName {this object} {
set nodeName [$object identity]
regsub -all {\.} $nodeName {_} nodeName
return $nodeName
}
method CSServerNode::changeParameters {this} {
if {[$this paramDialog] == ""} {
set server [$this server]
set name "paramdlg-[[$server broker] name]-[$server name]"
$this paramDialog [CSParamDialog new [$this view].$name \
[$this view] \
$this \
"list [$this server]" \
[$this changeableParameters]]
}
[$this paramDialog] popUp
}
method CSServerNode::changeableParameters {this} {
return [list orb_timeout orb_linger orb_report]
}
method CSServerNode::shutdown {this {confirm 1}} {
if $confirm {
set name [$this name]
$this confirmShutdown "Shutdown Server '$name'" \
"Are you sure you want to shutdown server '$name'?" \
shutdownServer
return
}
if [catch {[$this server] shutdown} shutdownError] {
[$this view] error $shutdownError
} else {
set broker [[$this parent] parent]
$broker update 1
}
}
method CSServerNode::doUpdate {this {rebuild 1}} {
$this CSProcessNode::doUpdate $rebuild
set info [$this info]
set server [$this server]
ORB::splitImplemId [$server implemId] implemId implemVersion
set fullId ${implemId}.${implemVersion}
set upTime [Repository::formatSeconds [$server upTime]]
$info addHeader "Server"
$info addItem "Name" [$server name]
$info addItem "Implementation Id" [format "%10s" $fullId]
$info addItem "Port" [format "%10d" [$server port]]
$info addItem "UpTime" [format "%10s" $upTime]
$info addItem "Requests handled" [format "%10d" [$server requests]]
$info addItem "Busyness" [format "%10.3f" [$server busyness]]
$info addHeader "Parameters"
$info addParameter orb_timeout [$server getParameter orb_timeout]
$info addParameter orb_linger [$server getParameter orb_linger]
$info addParameter orb_report [$server getParameter orb_report]
$info addParameter orb_maxclients [$server getParameter orb_maxclients]
$info addParameter orb_maxinstances [$server getParameter orb_maxinstances]
}
# Do not delete this line -- regeneration end marker