swirl
Guide to OmniMark 7   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
      Other Library Functions  
function  

wsb.add-service

 
 

Library: Net, Web Services Broker (OMWSB)
Import: omwsb.xmd

Declaration

  export external function add-service
    to                        value server      server
    named                     value stream      service-name
    of-type                   value stream      type        optional
    handled-by                value stream      program
    min-threads               value integer     min         optional
    max-threads               value integer     max         optional

Argument definitions

server
a server OMX returned by a call to create-server
service-name
the name of the service to register
type
the type of request that is to be serviced
program
the file name of the OmniMark virtual machine code file which is to be run to handle requests of the specified service-name and type
min-threads
the minimum number of threads to prepare for handling this type of action. If not specified, the value of the min-threads argument to create-server is used
max-threads
the maximum number of threads to prepare for handling this type of action. If not specified, the value of the max-threads argument to create-server is used


Purpose

The wsb.add-service function allows a new service to be added to an already initialized server OMX. This function can be used to initialize the service mapping prior to servicing any requests, as well as allowing services to be dynamically added at runtime. If a service with the same name and type is already in the table, an exception is thrown. Once a service is registered, all incoming requests that match both the service name and the service type are sent to an invocation of the compiled OmniMark program named by the program parameter.

wsb.add-service creates a thread pool with min-threads threads associated with that service. The actual number of running threads at a given time varies based on the current load on that service, but always ranges between min-threads and max-threads.

See the description of wsb.create-server for further details on the service-name and type parameters.

        Other Library Functions
   wsb.add-service
   wsb.clear-all-services
   wsb.create-server
   wsb.dispatch-request
   wsb.has-known-request-type
   wsb.reader
   wsb.remove-service
   wsb.request
   wsb.request-header
   wsb.request-name
   wsb.request-type
   wsb.server
   wsb.service-exists
   wsb.start-servicing-requests
   wsb.wait-for-request
   wsb.writer
 
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACYLIBRARIES ] [ ERRORS ]

OmniMark 7.1.2 Documentation Generated: June 28, 2005 at 5:46:06 pm
If you have any comments about this section of the documentation, send email to [email protected]

Copyright © Stilo Corporation, 1988-2005.