openlsd.network.server.LSDServerHttpIoHandler Class Reference

Inheritance diagram for openlsd.network.server.LSDServerHttpIoHandler:

Inheritance graph
[legend]
Collaboration diagram for openlsd.network.server.LSDServerHttpIoHandler:

Collaboration graph
[legend]

List of all members.


Detailed Description

Http Service for the OpenLSD Server (Info, Clean, Shutdown)
Author:
Frederic BREGIER LGPL 2007

Public Member Functions

 LSDServerHttpIoHandler ()
void close (boolean wait)
void messageSent (IoSession session, Object arg1) throws Exception
void exceptionCaught (IoSession session, Throwable cause) throws Exception
void sessionIdle (IoSession session, IdleStatus status) throws Exception
void messageReceived (IoSession session, Object message) throws Exception

Public Attributes

SocketAcceptor httpAcceptor = null
OrderedThreadPoolExecutor orderedThreadPoolExecutor = null

Static Public Attributes

static final String SHUTDOWN = "SHUTDOWN"
static final String INFOSESSION = "INFOSESSION"
static final String INFOSTORAGE = "INFOSTORAGE"
static final String INFOFULLSTORAGE = "INFOFULLSTORAGE"
static final String CLEAN = "CLEAN"
static final String CSV = "CSV"
static final String ORDER = "order"
static int port = 8090

Private Member Functions

void writeResponse (IoSession session, HttpRequest req, MutableHttpResponse res)
String getInfoLSDServerInstance (LSDServerInstance lsi, boolean csv)
String getInfoLSDStorage (LSDLegacy legacy, boolean csv)
String getInfoFullLSDStorage (LSDLegacy legacy, boolean csv)
String getMenu ()

Private Attributes

boolean isShutdown = false

Constructor & Destructor Documentation

openlsd.network.server.LSDServerHttpIoHandler.LSDServerHttpIoHandler (  ) 

Construct one HTTP Service on pre defined port (set through XML configuration); if cannot be open, httpAcceptor will be null.


Member Function Documentation

void openlsd.network.server.LSDServerHttpIoHandler.close ( boolean  wait  ) 

Close the HTTP Service

Parameters:
wait 

void openlsd.network.server.LSDServerHttpIoHandler.messageSent ( IoSession  session,
Object  arg1 
) throws Exception

Parameters:
session 
arg1 (non-Javadoc)
See also:
org.apache.mina.common.IoHandlerAdapter.messageSent(org.apache.mina.common.IoSession, java.lang.Object)

void openlsd.network.server.LSDServerHttpIoHandler.exceptionCaught ( IoSession  session,
Throwable  cause 
) throws Exception

Parameters:
session 
cause 
Exceptions:
Exception 

void openlsd.network.server.LSDServerHttpIoHandler.writeResponse ( IoSession  session,
HttpRequest  req,
MutableHttpResponse  res 
) [private]

Parameters:
session 
req 
res 

void openlsd.network.server.LSDServerHttpIoHandler.sessionIdle ( IoSession  session,
IdleStatus  status 
) throws Exception

Parameters:
session 
status 
Exceptions:
Exception 

void openlsd.network.server.LSDServerHttpIoHandler.messageReceived ( IoSession  session,
Object  message 
) throws Exception

Parameters:
session 
message 
Exceptions:
Exception 

String openlsd.network.server.LSDServerHttpIoHandler.getInfoLSDServerInstance ( LSDServerInstance  lsi,
boolean  csv 
) [private]

Get Info on the given LSDServerInstance

Parameters:
lsi 
csv 
Returns:
the String including info on LSDServerInstance

String openlsd.network.server.LSDServerHttpIoHandler.getInfoLSDStorage ( LSDLegacy  legacy,
boolean  csv 
) [private]

Return Info on LSD storages

Parameters:
legacy 
csv 
Returns:
the String including info on LSD Storage

String openlsd.network.server.LSDServerHttpIoHandler.getInfoFullLSDStorage ( LSDLegacy  legacy,
boolean  csv 
) [private]

Return Full Info on LSD storages (might be very long)

Parameters:
legacy 
csv 
Returns:
the String including info on LSD Storage

String openlsd.network.server.LSDServerHttpIoHandler.getMenu (  )  [private]

Return the Menu

Returns:
the String including the menu


Member Data Documentation

final String openlsd.network.server.LSDServerHttpIoHandler.SHUTDOWN = "SHUTDOWN" [static]

SHUTDOWN COMMAND

final String openlsd.network.server.LSDServerHttpIoHandler.INFOSESSION = "INFOSESSION" [static]

INFO (Session statistics) COMMAND

final String openlsd.network.server.LSDServerHttpIoHandler.INFOSTORAGE = "INFOSTORAGE" [static]

INFO (Storage statistics) COMMAND

final String openlsd.network.server.LSDServerHttpIoHandler.INFOFULLSTORAGE = "INFOFULLSTORAGE" [static]

INFO (Full Storage statistics) COMMAND

final String openlsd.network.server.LSDServerHttpIoHandler.CLEAN = "CLEAN" [static]

CLEAN COMMAND

CSV OPTION

final String openlsd.network.server.LSDServerHttpIoHandler.ORDER = "order" [static]

ORDER BASED URL

Port for HTTP service

SocketAcceptor for HTTP Service

OrderedThreadPoolExecutor for HTTP Service

Set to True if in Shutdown Process


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