eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SmalltalkShareClient':

Home

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

Class: SmalltalkShareClient


Inheritance:

   Object
   |
   +--SunRPC::RPCEndPoint
      |
      +--SunRPC::RPCClient
         |
         +--SmalltalkShareClient

Package:
stx:goodies/communication
Category:
Net-Communication-SmallTeam
Version:
rev: 1.7 date: 2017/05/22 10:22:37
user: mawalch
file: SmalltalkShareClient.st directory: goodies/communication
module: stx stc-classLibrary: communication
Author:
Claus Gittinger

Description:


a client for remote image access.


[start with (server side):]
    SmalltalkShareServer start
    SmalltalkShareServer startUDP

[start with (client side):]
    |client matchArg list|
    client := SmalltalkShareClient toHost:'localhost'.
    matchArg := Dictionary new.
    matchArg at:'classNamePattern' put:'*'.
    matchArg at:'categoryPattern' put:'*'.
    matchArg at:'packagePattern' put:'*'.
    list := client getClassList:matchArg.
    client close.
    list inspect.

    SystemBrowser openOnRemoteImageOnHost:'localhost' port:nil


Related information:

    SmalltalkShareServer

Class protocol:

spec
o  xdr


Instance protocol:

operations
o  getCategories
|client list|

client := self new host:'localhost'.
list := client getCategories.
client close.
list inspect.

o  getClassNames: getClassNamesArg
|client arg list|

arg := Dictionary new.
arg at:'classNameMatchPattern' put:'A*'.
arg at:'categoryMatchPattern' put:'*'.
arg at:'packageMatchPattern' put:'*'.
client := self new host:'localhost'.
list := client getClassNames:arg.
client close.
list inspect.

o  getClasses: getClassNamesArg
|client arg list|

arg := Dictionary new.
arg at:'classNameMatchPattern' put:'A*'.
arg at:'categoryMatchPattern' put:'*'.
arg at:'packageMatchPattern' put:'*'.
client := self new host:'localhost'.
list := client getClasses:arg.
client close.
list inspect.

o  getMethodInfo: getMethodInfoArg

o  getMethodNames: getMethodNamesArg
|client arg list|

arg := Dictionary new.
arg at:'className' put:'Array'.
arg at:'meta' put:false.
client := self new host:'localhost'.
list := client getMethodNames:arg.
client close.
list inspect.

utilities
o  downLoad
synchronize from the other smalltalk - i.e. for all
classes which are newer in the other image, download the class
and install it.

o  downLoadPackagesMatching: packageMatchPattern
synchronize from the other smalltalk - i.e. for all
classes which are newer in the other image, download the class
and install it.

o  getAllClassNames
|service list|

service := self toHost:'localhost'.
list := service getAllClassNames.
service close.
list inspect.

|service list|

service := self toHost:'funkfix'.
list := service getAllClassNames.
service close

o  getAllShortClassStubsFor: anEnvironment
|service list|

service := self toHost:'localhost'.
list := service getAllShortClassStubs.
service close.
list inspect.

|service list|

service := self toHost:'funkfix'.
list := service getAllClassNames.
service close

o  getAllShortMethodStubsFor: aClass

o  getClassNamed: className
|client cls|

client := self new host:'localhost'.
cls := client getClassNamed:'Array'.
client close.
cls inspect

o  getClassNamesInPackagesMatching: packageMatchPattern
|client list|

client := self new host:'localhost'.
list := client getClassNamesInPackagesMatching:'stx:libbasic3'.
client close.
list inspect

o  getInfoForClassNamed: className
|client cls|

client := self new host:'localhost'.
cls := client getInfoForClassNamed:'Array'.
client close.
cls inspect

o  getInfoForMethodNamed: selector inClass: aClass
|client info|

client := self new host:'localhost'.
info := client getInfoForMethodNamed:#at:put: inClass:Array.
client close.
info inspect


Private classes:

    RemoteClass
    RemoteMetaclass
    RemoteMethod

Examples:


get list of class categories:
  |shareClient list|

  shareClient := SmalltalkShareClient toHost:'localhost'.
  list := shareClient getCategories.
  shareClient close.
  list inspect.
get list of classes (name starting with A) from other image:
  |shareClient matchArg list|

  shareClient := SmalltalkShareClient toHost:'localhost'.

  matchArg := Dictionary new.
  matchArg at:'classNameMatchPattern' put:'A*'.
  matchArg at:'categoryMatchPattern' put:'*'.
  matchArg at:'packageMatchPattern' put:'*'.
  list := shareClient getClasses:matchArg.
  shareClient close.
  list inspect.
get list of classes (in category Magnitude-Numbers) from other image:
  |shareClient matchArg list|

  shareClient := SmalltalkShareClient toHost:'localhost'.

  matchArg := Dictionary new.
  matchArg at:'classNameMatchPattern' put:'*'.
  matchArg at:'categoryMatchPattern' put:'Magnitude-Numbers'.
  matchArg at:'packageMatchPattern' put:'*'.
  list := shareClient getClasses:matchArg.
  shareClient close.
  list inspect.
get list of classes of a package from other image:
  |shareClient matchArg list|

  shareClient := SmalltalkShareClient toHost:'localhost'.

  matchArg := Dictionary new.
  matchArg at:'classNameMatchPattern' put:'*'.
  matchArg at:'categoryMatchPattern' put:'*'.
  matchArg at:'packageMatchPattern' put:'stx:goodies/communication'.
  list := shareClient getClasses:matchArg.
  shareClient close.
  list inspect.


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Sat, 20 Apr 2024 09:49:28 GMT