public class WandoraHttpServer extends HTTPServer
WandoraHttpServer implements simple HTTP server application used in Wandora to browse Wandora stored topics and associations with external WWW browser.
However, Wandora uses WandoraJettyServer instead of WandoraHttpServer for embedded HTTP server. This class has been saved for optional usage.
WandoraJettyServer
Modifier and Type | Class and Description |
---|---|
class |
WandoraHttpServer.IconThread
Deprecated.
|
class |
WandoraHttpServer.MockupRequest
Deprecated.
|
class |
WandoraHttpServer.TopicFilter
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
autoStart
Deprecated.
|
private static int |
defaultPort
Deprecated.
|
private javax.swing.Icon |
hitIcon
Deprecated.
|
private java.lang.Thread |
iconThread
Deprecated.
|
private long |
lastHit
Deprecated.
|
private boolean |
localOnly
Deprecated.
|
private javax.swing.Icon |
offIcon
Deprecated.
|
private javax.swing.Icon |
onIcon
Deprecated.
|
static java.lang.String |
OPTION_AUTOSTART
Deprecated.
|
static java.lang.String |
OPTION_LOCALONLY
Deprecated.
|
static java.lang.String |
OPTION_PASSWORD
Deprecated.
|
static java.lang.String |
OPTION_PORT
Deprecated.
|
static java.lang.String |
OPTION_STATICPATH
Deprecated.
|
static java.lang.String |
OPTION_TEMPLATEFILE
Deprecated.
|
static java.lang.String |
OPTION_TEMPLATEPATH
Deprecated.
|
static java.lang.String |
OPTION_USERNAME
Deprecated.
|
static java.lang.String |
OPTION_USESSL
Deprecated.
|
private java.lang.String |
staticPath
Deprecated.
|
private javax.swing.JButton |
statusButton
Deprecated.
|
private java.lang.String |
templateFile
Deprecated.
|
private java.lang.String |
templatePath
Deprecated.
|
private org.apache.velocity.app.VelocityEngine |
velocityEngine
Deprecated.
|
private Wandora |
wandora
Deprecated.
|
loginPass, loginUser, mimeTypes, port, printExceptions, running, serverSocket, serverThread, useSSL
Constructor and Description |
---|
WandoraHttpServer(Wandora wandora)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
protected void |
getDefaultContext(org.apache.velocity.VelocityContext context)
Deprecated.
|
protected boolean |
getPage(java.io.OutputStream out,
java.lang.String[] parameters)
Deprecated.
Gets the contents of the page for the given request.
|
java.lang.String |
getStaticPath()
Deprecated.
|
java.lang.String |
getTemplateFile()
Deprecated.
|
java.lang.String |
getTemplatePath()
Deprecated.
|
protected void |
handleRequest(java.net.Socket s)
Deprecated.
Handles http request.
|
boolean |
isAutoStart()
Deprecated.
|
boolean |
isLocalOnly()
Deprecated.
|
void |
readOptions(Options options)
Deprecated.
|
static int |
resolvePort(Wandora wandora)
Deprecated.
|
void |
setAutoStart(boolean b)
Deprecated.
|
void |
setLocalOnly(boolean b)
Deprecated.
|
void |
setStaticPath(java.lang.String p)
Deprecated.
|
void |
setStatusComponent(javax.swing.JButton button,
java.lang.String onIcon,
java.lang.String offIcon,
java.lang.String hitIcon)
Deprecated.
|
void |
setTemplateFile(java.lang.String p)
Deprecated.
|
void |
setTemplatePath(java.lang.String p)
Deprecated.
|
void |
start()
Deprecated.
Starts the server.
|
void |
stopServer()
Deprecated.
Stops the server and waits for the server thread to die before returning.
|
private void |
updateStatusIcon()
Deprecated.
|
void |
writeOptions(Options options)
Deprecated.
|
badRequest, copyStream, getLoginPassword, getLoginUser, getParamValue, getPort, getRealm, handleRequest, isRunning, isUseSSL, notFound, parseGetParams, registerMimeTypes, returnFile, setLogin, setPort, setPrintExceptions, setUseSSL, writeHeader, writeHeaderForFile, writeHeaderForFile, writeHTMLHeader, writeInternalServerError, writeSimpleHTML
private static final int defaultPort
public static final java.lang.String OPTION_AUTOSTART
public static final java.lang.String OPTION_PORT
public static final java.lang.String OPTION_LOCALONLY
public static final java.lang.String OPTION_STATICPATH
public static final java.lang.String OPTION_TEMPLATEPATH
public static final java.lang.String OPTION_TEMPLATEFILE
public static final java.lang.String OPTION_USESSL
public static final java.lang.String OPTION_USERNAME
public static final java.lang.String OPTION_PASSWORD
private Wandora wandora
private java.lang.String staticPath
private java.lang.String templateFile
private java.lang.String templatePath
private org.apache.velocity.app.VelocityEngine velocityEngine
private boolean localOnly
private boolean autoStart
private javax.swing.JButton statusButton
private javax.swing.Icon onIcon
private javax.swing.Icon offIcon
private javax.swing.Icon hitIcon
private java.lang.Thread iconThread
private long lastHit
public WandoraHttpServer(Wandora wandora)
public void readOptions(Options options)
public void writeOptions(Options options)
private void updateStatusIcon()
public void setStatusComponent(javax.swing.JButton button, java.lang.String onIcon, java.lang.String offIcon, java.lang.String hitIcon)
public void start()
HTTPServer
start
in class HTTPServer
public void stopServer()
HTTPServer
stopServer
in class HTTPServer
public void setStaticPath(java.lang.String p)
public java.lang.String getStaticPath()
public void setTemplateFile(java.lang.String p)
public java.lang.String getTemplateFile()
public void setTemplatePath(java.lang.String p)
public java.lang.String getTemplatePath()
public boolean isLocalOnly()
public void setLocalOnly(boolean b)
public boolean isAutoStart()
public void setAutoStart(boolean b)
public static int resolvePort(Wandora wandora)
protected void getDefaultContext(org.apache.velocity.VelocityContext context)
protected void handleRequest(java.net.Socket s) throws java.io.IOException
HTTPServer
handleRequest
in class HTTPServer
java.io.IOException
protected boolean getPage(java.io.OutputStream out, java.lang.String[] parameters)
HTTPServer
getPage
in class HTTPServer
Copyright 2004-2015 Wandora Team