|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Thread | +--org.locomotive.loco.HTTPServer
The org.locomotive.loco.HTTPServer is the Locomotive's embedded web server. The server instances are launched by the org.locomotive.loco.Loco object on startup.
Fields inherited from class java.lang.Thread |
MAX_PRIORITY,
MIN_PRIORITY,
NORM_PRIORITY |
Method Summary | |
Log |
getAccessLog()
gets the reference to the access log of this HTTPServer instance |
int |
getActiveThreadCount()
Returns the number of active RequestManager Threads. |
static boolean |
getAutoSessionHandling()
returns the current value of the auto_session_handling flag. |
HTTPServerConfig |
getConfig()
returns the HTTPServerConfig of the server |
int |
getCurrentRequestID()
gets the current value of the request id. |
Log |
getEventLog()
gets the reference to the event log of this HTTPServer instance |
int |
getMaxThreadPoolSize()
Returns the number of active RequestManager Threads. |
Log |
getServerLog()
gets the reference to the main server log of this HTTPServer instance |
java.util.Date |
getStartupDate()
returns the startup date of the HTTPServer |
int |
getThreadPoolSize()
Returns the number of active RequestManager Threads. |
java.lang.String |
getVersionString()
returns the Version Number of the server (for now, returns the same String as Loco.getVersionString(); |
void |
log(int lev,
java.lang.String s)
log to the HTTPServer log |
void |
logAccess(java.lang.String client_host,
java.lang.String remote_username,
java.lang.String authenticated_username,
java.lang.String request_line,
int response_status,
int response_length)
Log a request to the HTTPServer access log |
void |
logEvent(int level,
int rid,
Session sess,
User u,
java.lang.String major,
java.lang.String minor,
java.lang.String data)
log to the HTTPServer event log |
void |
run()
This method is called by the Loco Object |
void |
setStopAccepting()
for shutting down the HTTPServer. |
Methods inherited from class java.lang.Thread |
activeCount,
checkAccess,
countStackFrames,
currentThread,
destroy,
dumpStack,
enumerate,
getContextClassLoader,
getName,
getPriority,
getThreadGroup,
interrupt,
interrupted,
isAlive,
isDaemon,
isInterrupted,
join,
join,
join,
resume,
setContextClassLoader,
setDaemon,
setName,
setPriority,
sleep,
sleep,
start,
stop,
stop,
suspend,
toString,
yield |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Method Detail |
public void run()
public void log(int lev, java.lang.String s)
lev
- the log levels
- a string to be loggedpublic void logEvent(int level, int rid, Session sess, User u, java.lang.String major, java.lang.String minor, java.lang.String data)
level
- - the log levelrid
- - the response id (used mostly for debugging)sess
- - the current sessionu
- - the Usermajor
- - the major event region or code sectionminor
- - the minor event codedata
- - event specific datapublic void logAccess(java.lang.String client_host, java.lang.String remote_username, java.lang.String authenticated_username, java.lang.String request_line, int response_status, int response_length)
client_host
- The client's IP address (for now)remote_username
- The rfc931 username of the user at the clientauthenticated_username
- The authenticated username as specified
by rfc931request_line
- The request line exactly as it came from the clientresponse_status
- The numeric HTTP status code returned to the
clientresponse_length
- The number of bytes of the response body that
was sent to the clientpublic Log getServerLog()
public Log getEventLog()
public Log getAccessLog()
public int getActiveThreadCount()
public int getThreadPoolSize()
public int getMaxThreadPoolSize()
public java.util.Date getStartupDate()
public int getCurrentRequestID()
public static boolean getAutoSessionHandling()
setAutoSessionHandling
public void setStopAccepting()
public HTTPServerConfig getConfig()
public java.lang.String getVersionString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |