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.20 date: 2023/07/03 08:23:06
user: cg
file: HTTPSelectorService.st directory: goodies/webServer
module: stx stc-classLibrary: webServer

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.

copyright

COPYRIGHT (c) 2003 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:

queries
o  isAbstract
(comment from inherited method)
if true, its not listed in wellknownServices and cannot be instantiated


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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Thu, 21 Nov 2024 12:36:45 GMT