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.14 date: 2022/10/13 17:53:44
user: cg
file: SmalltalkShareClient.st directory: goodies/communication
module: stx stc-classLibrary: communication

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

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:

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.

Usage example(s):

     |client arg|

     arg := Dictionary new.
     arg at:'classNamePattern' put:'A*'.
     arg at:'categoryPattern' put:'*'.
     arg at:'packagePattern' put:'*'.
     client := self new host:'localhost'.
     client downLoad.
     client close

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.

Usage example(s):

     |client arg|

     client := self new host:'localhost'.
     client downLoadPackagesMatching:#'stx:goodies/communication'.
     client close

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

Usage example(s):

     |client cls|

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

Usage example(s):

     |client cls|

     client := self new host:'localhost'.
     cls := client getInfoForClassNamed:'Object'.
     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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sun, 22 Dec 2024 02:52:08 GMT