home *** CD-ROM | disk | FTP | other *** search
/ PC World 1997 November / PCWorld_1997-11_cd.bin / software / programy / komix / DATA.Z / csnameserv.tcl < prev    next >
Text File  |  1996-10-18  |  2KB  |  73 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cayenne Software Inc.    1996
  4. #
  5. #      File:           @(#)csnameserv.tcl    /main/hindenburg/7
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)csnameserv.tcl    /main/hindenburg/7   18 Oct 1996 Copyright 1996 Cayenne Software Inc.
  10.  
  11. # Start user added include file section
  12. # End user added include file section
  13.  
  14. require "csserverno.tcl"
  15.  
  16. Class CSNameServerNode : {CSServerNode} {
  17.     constructor
  18.     method destructor
  19.     method childObjects
  20.     method createChild
  21.     method changeableParameters
  22.     method shutdown
  23.     method doUpdate
  24. }
  25.  
  26. constructor CSNameServerNode {class this name i_server} {
  27.     set this [CSServerNode::constructor $class $this $name $i_server]
  28.     # Start constructor user section
  29.  
  30.         $this label [$i_server name]
  31.         $this icon rep_namesrv_16
  32.  
  33.     # End constructor user section
  34.     return $this
  35. }
  36.  
  37. method CSNameServerNode::destructor {this} {
  38.     # Start destructor user section
  39.     # End destructor user section
  40.     $this CSServerNode::destructor
  41. }
  42.  
  43. method CSNameServerNode::childObjects {this} {
  44.     set server [$this server]
  45.     return [osort pid -integer [$server clients]]
  46. }
  47.  
  48. method CSNameServerNode::createChild {this object} {
  49.     return [CSClientNode new $this.[$this childName $object] $object]
  50. }
  51.  
  52. method CSNameServerNode::changeableParameters {this} {
  53.     return [list orb_timeout]
  54. }
  55.  
  56. method CSNameServerNode::shutdown {this {confirm 1}} {
  57.     if $confirm {
  58.         $this confirmShutdown "Shutdown Nameserver" \
  59.             "Are you sure you want to shutdown the nameserver?" \
  60.             shutdownNameServer
  61.         return
  62.     }
  63.  
  64.     $this CSServerNode::shutdown $confirm
  65. }
  66.  
  67. method CSNameServerNode::doUpdate {this {rebuild 1}} {
  68.     $this CSServerNode::doUpdate $rebuild
  69. }
  70.  
  71. # Do not delete this line -- regeneration end marker
  72.  
  73.