Unite API

Class opera.io.webserver

Object
   |
   +--opera.io.webserver

class opera.io.webserver


Web server implementation

The WebServer offers access to information about the proxy, device and currently running service. It also maintains incoming connections.

Services running on the Web server are accessed through a URL on the form: http://device.host.proxy/service/path, e.g. http://work.john.operaunite.com/wiki/addEntry


Defined in unite.js


Field Summary
 Object connections
          The current connections made to this Web server.
 String currentServiceName
          The name of the service currently accessing the webserver object, for example 'File Sharing'.
 String currentServicePath
          The path of the service currently accessing the webserver object, for example '/fileSharing/'.
 String deviceName
          The name of the device the Web server is running on, for example 'work'.
 String hostName
          The hostname of the Webserver, for example 'work.john.operaunite.com'.
 string originURL
          The URL the currently running service was downloaded from.
 String port
          The port this Web server is listening to, for example 8840.
 String proxyName
          The name of the proxy the Web server is connected to, for example 'operaunite.com'.
 String publicIP
          The public facing IP address of this Web server, as seen by the proxy.
 int publicPort
          The public facing port of this Web server, as seen by the proxy.
 Object services
          Services running on this Web server.
 String userName
          The My Opera user name of the user owning the Web server, for example 'john'.
 
Constructor Summary
opera.io.webserver()
            This class has no constructor.
 
Method Summary
 void addEventListener( <String> pathFragment, <Function> handler, <boolean> useCapture )
           Add an event listener for incoming requests.
 String getContentType( <String> file )
           Get the MIME content type mapped to a particular file name.
 void removeEventListener( <String> pathFragment, <Function> handler, <boolean> useCapture )
           Remove an event listener from the server.
 void shareFile( <File> file, <String> path )
           Shares a File
 void sharePath( <String> path, <File> file )
           Share the given file on the given URL path.
 void unshareFile( <File> file )
           Unshares a previously shared file
 void unsharePath( <String> path )
           Unshare a File previously shared on the given URL path

Field Detail

connections

Object connections

currentServiceName

String currentServiceName

currentServicePath

String currentServicePath

deviceName

String deviceName

hostName

String hostName

originURL

string originURL

port

String port

proxyName

String proxyName

publicIP

String publicIP

publicPort

int publicPort

services

Object services

userName

String userName

Constructor Detail

opera.io.webserver

opera.io.webserver()

Method Detail

addEventListener

void addEventListener( <String> pathFragment, <Function> handler, <boolean> useCapture )

getContentType

String getContentType( <String> file )

removeEventListener

void removeEventListener( <String> pathFragment, <Function> handler, <boolean> useCapture )

shareFile

void shareFile( <File> file, <String> path )

sharePath

void sharePath( <String> path, <File> file )

unshareFile

void unshareFile( <File> file )

unsharePath

void unsharePath( <String> path )

Unite API

Documentation generated by JSDoc on Tue Oct 6 11:15:52 2009