Node Director
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
sfi.director.application.FrontendHTTPServer Class Reference
Inheritance diagram for sfi.director.application.FrontendHTTPServer:
sfi.director.util.NanoHTTPD fi.iki.elonen.NanoHTTPD

Classes

class  SessionInfo
class  WFEntry

Public Member Functions

 FrontendHTTPServer (int port, frinterface frontend, boolean master, FrontendCallback session) throws IOException
 FrontendHTTPServer (int port, frinterface frontend, boolean master, FrontendCallback session, boolean ssl) throws IOException
Response redirect (Properties header, String uri)
Response serve (String uri, NanoHTTPD.Method imethod, Map< String, String >header, Map< String, String >parms, Map< String, String >files)
Response sessionProxy (SessionInfo sinfo, String uri, String method, Map< String, String > header, Map< String, String > parms, Map< String, String > files)
String sessionId ()
 Accessor for attribute sessionId.
String sessionId (String sessionId)
 Mutator for attribute sessionId.
String linkid ()
 Accessor for attribute linkid.
JSONObject session_request (String method, JSONArray args) throws DirectorException
JSONObject session_enumDomains (JSONArray args)
JSONObject session_create (JSONArray args) throws DirectorException
JSONObject auth_request (String method, JSONArray args) throws DirectorException
JSONObject auth_login (JSONArray args) throws DirectorException
DBObject authUser ()
 Accessor for attribute authUser.
DBObject authUser (DBObject authUser)
 Mutator for attribute authUser.
DBObject authRole ()
 Accessor for attribute authRole.
DBObject authRole (DBObject authRole)
 Mutator for attribute authRole.
void ensure_authenticated () throws DirectorException
JSONObject db_request (String method, JSONArray args) throws DirectorException
JSONObject db_listevents (JSONObject args) throws DirectorException
JSONObject db_event (JSONObject args) throws DirectorException
JSONObject db_replace (JSONObject args) throws DirectorException
JSONObject db_get (JSONObject args) throws DirectorException
JSONObject db_decryptpw (JSONObject args) throws DirectorException
String decryptpw (DBObject dbo, String password)
JSONObject db_remove (JSONObject args) throws DirectorException
JSONObject db_searchdispose (JSONObject args) throws DirectorException
JSONObject db_searchsize (JSONObject args) throws DirectorException
JSONObject db_searchnoop (JSONObject args) throws DirectorException
JSONObject db_searchget (JSONObject args) throws DirectorException
void fillRel (String evalRels, DBObject dbo)
JSONObject db_search (JSONObject args) throws DirectorException
JSONObject file_request (String method, JSONArray args) throws DirectorException
JSONObject file_retrieve (JSONArray args) throws DirectorException
JSONObject file_upload (JSONArray args) throws DirectorException
JSONObject util_request (String method, JSONArray args) throws DirectorException
JSONObject util_remotehostpw (JSONObject args) throws DirectorException
JSONObject util_logOverview (JSONObject args) throws DirectorException
JSONObject edit_request (String method, JSONArray args) throws DirectorException
JSONObject edit_fields (JSONObject args) throws DirectorException
JSONObject edit_data (JSONObject args) throws DirectorException
JSONObject edit_update (JSONObject args) throws DirectorException
JSONObject edit_export (JSONObject args) throws DirectorException
JSONObject edit_editor (JSONObject args) throws DirectorException
boolean useGzipWhenAccepted ()
- Public Member Functions inherited from sfi.director.util.NanoHTTPD
 NanoHTTPD (int port) throws IOException
 Starts a HTTP server to given port.
Response serveFile (String uri, Properties header, File dir, boolean allowListing)
Response serveFile (String uri, Map< String, String > header, File dir, boolean allowListing)
- Public Member Functions inherited from fi.iki.elonen.NanoHTTPD
 NanoHTTPD (String hostname, int port)
 Constructs an HTTP server on given hostname and port.
synchronized void closeAllConnections ()
 Forcibly closes all connections that are open.
final int getListeningPort ()
final boolean isAlive ()
void makeSecure (SSLServerSocketFactory sslServerSocketFactory)
 Call before start() to serve over HTTPS instead of HTTP.
Response newChunkedResponse (IStatus status, String mimeType, InputStream data)
 Create a response with unknown length (using HTTP 1.1 chunking).
Response newFixedLengthResponse (IStatus status, String mimeType, InputStream data, long totalBytes)
 Create a response with known length.
Response newFixedLengthResponse (IStatus status, String mimeType, String txt)
 Create a text response with known length.
Response newFixedLengthResponse (String msg)
 Create a text response with known length.
Response serve (IHTTPSession session)
 Override this to customize the server.
Response serve (String uri, Method method, Map< String, String > headers, Map< String, String > parms, Map< String, String > files)
 Override this to customize the server.
void setAsyncRunner (AsyncRunner asyncRunner)
 Pluggable strategy for asynchronously executing requests.
void setTempFileManagerFactory (TempFileManagerFactory tempFileManagerFactory)
 Pluggable strategy for creating and cleaning up temporary files.
void start () throws IOException
 Start the server.
void start (final int timeout) throws IOException
 Start the server.
void stop ()
 Stop the server.
final boolean wasStarted ()

Static Public Member Functions

static JSONArray fieldsToJSON (DaemonObjectEdit editor, Vector limitAttrs, Vector cfgFeatures)
- Static Public Member Functions inherited from sfi.director.util.NanoHTTPD
static String readLine (InputStream is) throws IOException
- Static Public Member Functions inherited from fi.iki.elonen.NanoHTTPD
static SSLServerSocketFactory makeSSLSocketFactory (KeyStore loadedKeyStore, KeyManager[] keyManagers) throws IOException
 Creates an SSLSocketFactory for HTTPS.
static SSLServerSocketFactory makeSSLSocketFactory (KeyStore loadedKeyStore, KeyManagerFactory loadedKeyFactory) throws IOException
 Creates an SSLSocketFactory for HTTPS.
static SSLServerSocketFactory makeSSLSocketFactory (String keyAndTrustStoreClasspathPath, char[] passphrase) throws IOException
 Creates an SSLSocketFactory for HTTPS.

Protected Member Functions

Response handleRpc (String method, Map< String, String > header, Map< String, String > parms, Map< String, String >files) throws Exception
JSONObject convertException (Throwable error)
DBObject emulateRootUser ()
void _recurse (int operation, DBConnection db, DBObject dbo) throws DirectorException
DBConnection findDB (JSONObject args) throws DirectorException
DBConnection findDB (String dbid) throws DirectorException
FrontendEditor findEditor (JSONObject args) throws DirectorException
JSONObject getEditorErrors (FrontendEditor editor)
void postEvent (DBConnection db, DBObject dbo, Record data, String event) throws DirectorException
void postEvent (Enumeration< DBConnection > dbs, Enumeration< DBObject > dbos, Record data, String event) throws DirectorException
void LogMonitor ()
void parseLog (LogEntry le)

Static Protected Member Functions

static void _hideField (DBObject fieldobj, boolean hidden, Vector cfgFeatures)

Protected Attributes

String sessionId = null
DBObject authUser = null
DBObject authRole = null

Static Protected Attributes

static int ERROR_ORIGIN_SERVER = 1
static int ERROR_ORIGIN_APPLICATION = 2

Additional Inherited Members

- Static Public Attributes inherited from sfi.director.util.NanoHTTPD
static final String MIME_PLAINTEXT = "text/plain"
 Common mime types for dynamic content.

Constructor & Destructor Documentation

sfi.director.application.FrontendHTTPServer.FrontendHTTPServer ( int  port,
frinterface  frontend,
boolean  master,
FrontendCallback  session 
) throws IOException
sfi.director.application.FrontendHTTPServer.FrontendHTTPServer ( int  port,
frinterface  frontend,
boolean  master,
FrontendCallback  session,
boolean  ssl 
) throws IOException

Member Function Documentation

static void sfi.director.application.FrontendHTTPServer._hideField ( DBObject  fieldobj,
boolean  hidden,
Vector  cfgFeatures 
)
staticprotected
void sfi.director.application.FrontendHTTPServer._recurse ( int  operation,
DBConnection  db,
DBObject  dbo 
) throws DirectorException
protected
JSONObject sfi.director.application.FrontendHTTPServer.auth_login ( JSONArray  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.auth_request ( String  method,
JSONArray  args 
) throws DirectorException
DBObject sfi.director.application.FrontendHTTPServer.authRole ( )

Accessor for attribute authRole.

Referenced by sfi.director.application.FrontendHTTPServer.authRole().

DBObject sfi.director.application.FrontendHTTPServer.authRole ( DBObject  authRole)

Mutator for attribute authRole.

References sfi.director.application.FrontendHTTPServer.authRole().

DBObject sfi.director.application.FrontendHTTPServer.authUser ( )
DBObject sfi.director.application.FrontendHTTPServer.authUser ( DBObject  authUser)

Mutator for attribute authUser.

References sfi.director.application.FrontendHTTPServer.authUser().

JSONObject sfi.director.application.FrontendHTTPServer.convertException ( Throwable  error)
protected
JSONObject sfi.director.application.FrontendHTTPServer.db_decryptpw ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.db_event ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.db_get ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.db_listevents ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.db_remove ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.db_replace ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.db_request ( String  method,
JSONArray  args 
) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.db_search ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.db_searchdispose ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.db_searchget ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.db_searchnoop ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.db_searchsize ( JSONObject  args) throws DirectorException
String sfi.director.application.FrontendHTTPServer.decryptpw ( DBObject  dbo,
String  password 
)
JSONObject sfi.director.application.FrontendHTTPServer.edit_data ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.edit_editor ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.edit_export ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.edit_fields ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.edit_request ( String  method,
JSONArray  args 
) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.edit_update ( JSONObject  args) throws DirectorException
DBObject sfi.director.application.FrontendHTTPServer.emulateRootUser ( )
protected
void sfi.director.application.FrontendHTTPServer.ensure_authenticated ( ) throws DirectorException
static JSONArray sfi.director.application.FrontendHTTPServer.fieldsToJSON ( DaemonObjectEdit  editor,
Vector  limitAttrs,
Vector  cfgFeatures 
)
static
JSONObject sfi.director.application.FrontendHTTPServer.file_request ( String  method,
JSONArray  args 
) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.file_retrieve ( JSONArray  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.file_upload ( JSONArray  args) throws DirectorException
void sfi.director.application.FrontendHTTPServer.fillRel ( String  evalRels,
DBObject  dbo 
)
DBConnection sfi.director.application.FrontendHTTPServer.findDB ( JSONObject  args) throws DirectorException
protected
DBConnection sfi.director.application.FrontendHTTPServer.findDB ( String  dbid) throws DirectorException
protected
FrontendEditor sfi.director.application.FrontendHTTPServer.findEditor ( JSONObject  args) throws DirectorException
protected
JSONObject sfi.director.application.FrontendHTTPServer.getEditorErrors ( FrontendEditor  editor)
protected
Response sfi.director.application.FrontendHTTPServer.handleRpc ( String  method,
Map< String, String >  header,
Map< String, String >  parms,
Map< String, String >  files 
) throws Exception
protected
String sfi.director.application.FrontendHTTPServer.linkid ( )

Accessor for attribute linkid.

Accessor for attribute linkid.

References sfi.director.application.FrontendInterface.sessionLinkid.

Referenced by sfi.director.application.FrontendHTTPServer.serve().

void sfi.director.application.FrontendHTTPServer.LogMonitor ( )
protected
void sfi.director.application.FrontendHTTPServer.parseLog ( LogEntry  le)
protected
void sfi.director.application.FrontendHTTPServer.postEvent ( DBConnection  db,
DBObject  dbo,
Record  data,
String  event 
) throws DirectorException
protected
void sfi.director.application.FrontendHTTPServer.postEvent ( Enumeration< DBConnection dbs,
Enumeration< DBObject dbos,
Record  data,
String  event 
) throws DirectorException
protected
Response sfi.director.application.FrontendHTTPServer.redirect ( Properties  header,
String  uri 
)
Response sfi.director.application.FrontendHTTPServer.serve ( String  uri,
NanoHTTPD.Method  imethod,
Map< String, String >  header,
Map< String, String >  parms,
Map< String, String >  files 
)
JSONObject sfi.director.application.FrontendHTTPServer.session_create ( JSONArray  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.session_enumDomains ( JSONArray  args)
JSONObject sfi.director.application.FrontendHTTPServer.session_request ( String  method,
JSONArray  args 
) throws DirectorException
String sfi.director.application.FrontendHTTPServer.sessionId ( )
String sfi.director.application.FrontendHTTPServer.sessionId ( String  sessionId)

Mutator for attribute sessionId.

References sfi.director.application.FrontendHTTPServer.sessionId().

Response sfi.director.application.FrontendHTTPServer.sessionProxy ( SessionInfo  sinfo,
String  uri,
String  method,
Map< String, String >  header,
Map< String, String >  parms,
Map< String, String >  files 
)
boolean sfi.director.application.FrontendHTTPServer.useGzipWhenAccepted ( )
Returns
true if the gzip compression should be used if the client accespts it.

Reimplemented from fi.iki.elonen.NanoHTTPD.

JSONObject sfi.director.application.FrontendHTTPServer.util_logOverview ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.util_remotehostpw ( JSONObject  args) throws DirectorException
JSONObject sfi.director.application.FrontendHTTPServer.util_request ( String  method,
JSONArray  args 
) throws DirectorException

Member Data Documentation

DBObject sfi.director.application.FrontendHTTPServer.authRole = null
protected
DBObject sfi.director.application.FrontendHTTPServer.authUser = null
protected
int sfi.director.application.FrontendHTTPServer.ERROR_ORIGIN_APPLICATION = 2
staticprotected
int sfi.director.application.FrontendHTTPServer.ERROR_ORIGIN_SERVER = 1
staticprotected
String sfi.director.application.FrontendHTTPServer.sessionId = null
protected

The documentation for this class was generated from the following file: