eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HTTPTentativeObjectService':

Home

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

Class: HTTPTentativeObjectService


Inheritance:

   Object
   |
   +--HTTPService
      |
      +--HTTPTentativeObjectService

Package:
stx:goodies/webServer
Category:
Net-Communication-HTTP-Services
Version:
rev: 1.27 date: 2023/04/02 17:02:29
user: cg
file: HTTPTentativeObjectService.st directory: goodies/webServer
module: stx stc-classLibrary: webServer

Description:


Serves temporary objects. Typically images, which are generated on the fly.
The objects are flushed after a while.

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:

defaults
o  defaultTemporaryLinkExpirationTime
default temporary link expiration time in seconds

o  linkName
return the default path (with slash)

o  longTemporaryLinkBrowerCacheExpirationTime
temporary browerCache expiration time in seconds for things which expire never in the service

o  temporaryLinkExpirationTime
default temporary link expiration time in seconds

** This is an obsolete interface - do not use it (it may vanish in future versions) **

queries
o  isThreadSafe


Instance protocol:

accessing
o  temporaryLinkExpirationTime
return the time (in seconds) which controls how long temporary links should be kept

o  temporaryLinkExpirationTime: something
set the time (in seconds) which controls how long temporary links should be kept

initialization
o  initialize

maintenance html presentation
o  specificChangeFromRequest: aRequest
extracts parameter from an html-maintenance post-request

o  specificInputFieldsForRequest: aRequest
(comment from inherited method)
generates the html-fragment for the maintenance form;
service specific - to be redefined by services.

persistency
o  settingSelectors
answer the selectors that are used to configure a service - i.e. those which are
saved in the webServer-settings file.

Usage example(s):

     HTTPService new settingSelectors
     self new settingSelectors

registration
o  shutdown
unregister myself from an HTTPServer (if I am registered as default)

o  startup
when registering with aServer, and no
tentativeObjectService has been registered as default until now,
register myself

request handling
o  process: aRequest
return the temporary object's value

serving-helpers
o  imageInfoForFileName: aPath
get an image from temporary links or hard disc

temporary link-add/remove
o  clearTemporaryLinkIds
Clear all temp linkIds.

o  expireOldTemporaryLinksFor: now
expire old temporary links

o  graphicLinkIdFor: anImage
Return the linkId for a temporary graphic link.

o  graphicLinkIdFor: anImage expirationTimeDelta: anExpirationTimeDelta
Return the linkId for a temporary graphic link.

o  nextSequenceNumber
generate and return a unique sequence number
(used for temporary link-generation)

o  removeTemporaryLinkInfoForUrlPath: urlPath
remove the temporary link if it is available

o  temporaryLinkBaseName: aBaseNameOrNil for: anObject type: aType expirationTimeDelta: anExpirationTimeDelta
Return the linkId for a temporary object with a lifeTime of anExpirationTimeDelta
in seconds. Additional feature: if the passed anExpirationTimeDelta is the symbol #never,
that link will be kept for ever in the service. (but with a longBrowserCacheExpirationDelta in the browser).
aValue may be a block (or other #value-responding) thing;
its value is computed when a client asks for the link

o  temporaryLinkPathFor: anObject type: aType
Return the linkId for a temporary object.

o  temporaryLinkPathFor: anObject type: aType expirationTimeDelta: anExpirationTimeDelta
Return the linkId for a temporary object with a lifeTime of anExpirationTimeDelta
in seconds. Additional feature: if the passed anExpirationTimeDelta is the symbol #never,
that link will be kept for ever in the service. (but with a longBrowserCacheExpirationDelta in the browser).
aValue may be a block (or other #value-responding) thing;
its value is computed when a client asks for the link

temporary link-queries
o  hasExpiredForLinkObject: aLinkObject time: aTime
return true if exists and have a link for this path. Otherwise return false

o  hasExpiredForUrlPath: urlPath time: aTime
return false if urlPath is valid (exists and has not expired). Otherwise return true

o  hasTemporaryLinkForLinkObject: anLinkObject

o  hasTemporaryLinkForUrlPath: aPath

o  temporaryLinkInfoForLinkObject: aLinkObject
retrieve a temporary objects linkInfo - or nil

o  temporaryLinkInfoForUrlPath: relativeOrAbsoluteUrlPath
retrieve a temporary objects linkInfo - or nil


Private classes:

    TemporaryLinkInfo


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 07 Oct 2024 23:06:22 GMT