public abstract class ONetworkProtocolHttpAbstract extends ONetworkProtocol implements ONetworkHttpExecutor
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected OUser |
account |
protected OChannelTextServer |
channel |
protected OHttpNetworkCommandManager |
cmdManager |
protected OClientConnection |
connection |
protected OHttpRequest |
request |
protected OHttpResponse |
response |
server
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
ONetworkProtocolHttpAbstract(OServer server) |
executor, getListeningAddress, getServer, getType, getVersion
afterExecution, beforeExecution, isShutdownFlag, run, setDumpExceptions, softShutdown, startup
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected OClientConnection connection
protected OChannelTextServer channel
protected OUser account
protected OHttpRequest request
protected OHttpResponse response
protected OHttpNetworkCommandManager cmdManager
public ONetworkProtocolHttpAbstract(OServer server)
public void config(OServerNetworkListener iListener, OServer iServer, Socket iSocket, OContextConfiguration iConfiguration) throws IOException
config
in class ONetworkProtocol
IOException
public void service() throws ONetworkProtocolException, IOException
ONetworkProtocolException
IOException
public void sendShutdown()
sendShutdown
in class OSoftThread
public void shutdown()
shutdown
in interface OService
shutdown
in class OSoftThread
public OHttpRequest getRequest()
public OHttpResponse getResponse()
public OChannel getChannel()
getChannel
in class ONetworkProtocol
public OUser getAccount()
public String getSessionID()
public String getResponseCharSet()
public void setResponseCharSet(String responseCharSet)
public String[] getAdditionalResponseHeaders()
public OHttpNetworkCommandManager getCommandManager()
protected void handleError(Throwable e, OHttpRequest iRequest)
protected void sendTextContent(int iCode, String iReason, String iHeaders, String iContentType, String iContent, boolean iKeepAlive) throws IOException
IOException
protected void sendError(int iCode, String iReason, String iHeaders, String iContentType, String iContent, boolean iKeepAlive) throws IOException
IOException
protected void writeLine(String iContent) throws IOException
IOException
protected void sendStatus(int iStatus, String iReason) throws IOException
IOException
protected void sendResponseHeaders(String iContentType, boolean iKeepAlive) throws IOException
IOException
protected void readAllContent(OHttpRequest iRequest) throws IOException
IOException
protected void execute() throws Exception
execute
in class OSoftThread
Exception
protected String deCompress(byte[] zipBytes)
protected void connectionClosed()
protected void timeout()
protected void connectionError()
public static void registerHandlers(Object caller, OServer server, OServerNetworkListener iListener, OHttpNetworkCommandManager cmdManager)
protected void registerStatelessCommands(OServerNetworkListener iListener)
public OClientConnection getConnection()
public String getRemoteAddress()
getRemoteAddress
in interface ONetworkHttpExecutor
public void setDatabase(ODatabaseDocumentInternal db)
setDatabase
in interface ONetworkHttpExecutor
Copyright © 2009–2020 OrientDB. All rights reserved.