server object (Object/NES)

An object that represents the server in server-side JavaScript implementations.

Availability:

JavaScript - 1.1
Netscape Enterprise server - 2.0
JavaScript syntax:NESserver
Object properties:agent, host, hostname, port, protocol
Object methods:lock(), unlock()

This is a server-side host object representing the server. There is only one and you cannot instantiate it although you can make references to it. All users on the web server share this object.

This is an object that allows you to share values across all sessions running in all applications across the entire server. The locking facilities permit you to lock resources while you are using them.

Because this applies server-wide, there is even more reason to ensure you lock objects for the minimum of time and relinquish the locks as soon as possible. It is quite feasible to completely stall the whole server by locking a vital resource during the processing of a single client request. The effect of this is to make your server a single-threaded non-concurrent session server. That is, it will only actually serve one client request at a time.

See also:Netscape Enterprise Server, project object, response.server, unwatch(), watch()

PropertyJavaScriptJScriptNIEOperaNESECMADOMCSSHTMLNotes
agent1.1 1.1 n/a n/a n/a n/a2.0 2.0 n/a n/a n/a n/a-
host1.1 1.1 n/a n/a n/a n/a2.0 2.0 n/a n/a n/a n/a-
hostname1.1 1.1 n/a n/a n/a n/a2.0 2.0 n/a n/a n/a n/a-
port1.1 1.1 n/a n/a n/a n/a2.0 2.0 n/a n/a n/a n/a-
protocol1.1 1.1 n/a n/a n/a n/a2.0 2.0 n/a n/a n/a n/a-

MethodJavaScriptJScriptNIEOperaNESECMADOMCSSHTMLNotes
lock()1.1 1.1 n/a n/a n/a n/a2.0 2.0 n/a n/a n/a n/aWarning
unlock()1.1 1.1 n/a n/a n/a n/a2.0 2.0 n/a n/a n/a n/a-

Cross-references:

Wrox Instant JavaScript - page 65

Wrox Instant JavaScript - page 67