eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SunRPC::RPCServer':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: RPCServer (in SunRPC)


Inheritance:

   Object
   |
   +--SunRPC::RPCEndPoint
      |
      +--SunRPC::RPCServer
         |
         +--SmalltalkShareServer
         |
         +--SunRPC::DemoServer
         |
         +--SunRPC::MountServer
         |
         +--SunRPC::NFSServer
         |
         +--SunRPC::PortMapperServer

Package:
stx:goodies/communication
Category:
Net-Communication-SunRPC
Version:
rev: 1.58 date: 2022/09/09 12:56:40
user: stefan
file: SunRPC_RPCServer.st directory: goodies/communication
module: stx stc-classLibrary: communication

Description:


abstract superclass for RPC server programs.
See MountServer, NFSServer and DemoServer for concrete examples.

copyright

COPYRIGHT (c) 2002 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

accessing
o  addToServersRunning: aServer

o  removeFromServersRunning: aServer

o  serversRunning

debugging
o  debug: aBoolean
self debug:true
self debug:false

o  dumpBytes: aByteArray
self dumpBytes:#[]
self dumpBytes:#[ 0 1 2 ]
self dumpBytes:#[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 ]
self dumpBytes:#[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ]
self dumpBytes:#[ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 ]
self dumpBytes:#[ 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 ]
self dumpBytes:#[ 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 ]

o  logging: aBoolean
self logging:true
self logging:false

o  traceOp: aBoolean
self traceOp:true
self traceOp:false

o  verbose: aBoolean
self verbose:true
self verbose:false

initialization
o  initialize
Initialize class variables.

Usage example(s):

     SunRPC::RPCServer initialize.

o  killAll

o  killAllRPCServers
self killAllRPCServers

o  serverRunning
SmalltalkShareServer serverRunning
RPCServer serverRunning

queries
o  isAbstract
Return if this class is an abstract class.
True is returned here for myself only; false for subclasses.
Abstract subclasses must redefine this again.

o  isRPCServerClass

startup
o  isStartableWithMain
return true, if this is an application class,
which can be started via #main / #main:

o  main
Start a server

o  start
Start a server on its TCP port

Usage example(s):

     MountServer start
     NFSServer start
     SmalltalkShareServer start

o  startServerIfNotYetRunningAtPort: portNr protocol: protocol

o  startUDP
Start a server on its UDP port

Usage example(s):

     MountServer startUDP
     NFSServer startUDP
     SmalltalkShareServer startUDP


Instance protocol:

change & update
o  update: something with: aParameter from: changedObject
system is shutting down - unregister from portMapper

handle client
o  checkHost: hostName

o  checkHost: hostName askUser: askUser

o  confirmNewHost: hostName
A previously unauthorized host is trying to connect.
Ask the user if we can authorize this new host.

o  executeRequest: bytes
NFS has a bug here: even if registered with a different

o  handleClient: aSocket
This method is invoked when a new connection arrives (tcp),
or a packet was received (udp).
It checks the host (allow/deny), possibly asking via a Dialog,
then calls #handle*Client: to do the real work.

o  handleDatagramClient: aSocket
Called when a request arrives via udp;
Read the request, check for host being allowed and execute.

o  handleStreamClient: aSocket
Called when a good client request arrives via tcp;
Read the request and execute.

o  loopForever
Create and listen to my socket. When a connection arrives,
to handle the request (in #handleClient:).

o  performOperation: opName withArguments: argVector

o  readStreamDataFrom: aSocket
Read the request-data from a stream socket.

initialization
o  initialize
(comment from inherited method)
just to ignore initialize to objects which do not need it

operations
o  null
ignored - void

queries
o  handlePriority

o  isRunning

o  operationNames

o  operations

o  portNumbers

** This method must be redefined in concrete classes (subclassResponsibility) **

o  program

o  programNumber

o  programVersion

o  protocol

** This method must be redefined in concrete classes (subclassResponsibility) **

o  version

shutdown
o  release
close

startup
o  registerInPortMapper
start a local mapper then

o  restart

o  serverPriority

o  startConnectProcess
Called when snapshot is started, and at instance creation.

o  startServer
This is only run by SERVER instances at startup.

o  unregisterInPortMapper


Examples:


Abstract - see DemoServer, MountServer and NFSServer for examples.


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:27:45 GMT