eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HTTPSelectorService':

Home

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

Class: HTTPSelectorService


Inheritance:

   Object
   |
   +--HTTPService
      |
      +--HTTPSelectorService
         |
         +--Demos::WebDemoApp1
         |
         +--Demos::WebDemoShop
         |
         +--Demos::WebDemoShopSessions
         |
         +--Demos::WebHomePageForSTX
         |
         +--Demos::WebProcessList
         |
         +--Demos::WebScreenImageService
         |
         +--Demos::WebSmalltalkBrowser
         |
         +--HTTPClassDocService
         |
         +--HTTPEmbeddedApplicationService
         |
         +--HTTPSourceCodeAccessService
         |
         +--HTTPUtilityService
         |
         +--ServerMaintenanceService

Package:
stx:goodies/webServer
Category:
Net-Communication-HTTP-Services
Version:
rev: 1.18 date: 2018/08/20 08:09:05
user: cg
file: HTTPSelectorService.st directory: goodies/webServer
module: stx stc-classLibrary: webServer
Author:
Claus Gittinger

Description:


A service which takes the next URL component after the linkName as selector
and sends a corresponding message to itself.

For security, the set of messages must be enumerated by allowedMessages, and only
message are send, which are listed there.

For example, if a service registered itself as 'fooService' on a server which serves port 8088,
then a request for the URL 'http://hostName:8088/fooService/barMessage' will lead to
the message #barMessage be sent to the service (if it is listed in #allowedMessages).

See information on how to start a service in my superclasses.

Origin:
    this class was added to support easy migration of PWS (pluggable web services) applications.


Class protocol:

queries
o  isAbstract


Instance protocol:

queries-service
o  allowedMessages
return a collection of messages, that this service processes,
such as
#(foo bar baz)

o  defaultMessage
return the name of the default message; such as
#bla or 'index.html'.
However, the returned string must be in allowedMessages

o  isMessageAllowed: aSelector
return true, if aSelector is allowed to be sent to me as a web-request.
The default behavior is, to look in allowedMessages.
May be redefined in subclasses to do something more intelligent, e.g. pattern matching

request handling
o  process: aRequest
not reached



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Tue, 19 Mar 2024 11:24:18 GMT