Class ONetworkProtocolHttpAbstract
java.lang.Object
java.lang.Thread
com.orientechnologies.common.thread.OSoftThread
com.orientechnologies.orient.server.network.protocol.ONetworkProtocol
com.orientechnologies.orient.server.network.protocol.http.ONetworkProtocolHttpAbstract
- All Implemented Interfaces:
OService,ONetworkHttpExecutor,Runnable
- Direct Known Subclasses:
ONetworkProtocolHttpDb
public abstract class ONetworkProtocolHttpAbstract
extends ONetworkProtocol
implements ONetworkHttpExecutor
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected OUserprotected OChannelTextServerprotected OHttpNetworkCommandManagerprotected OClientConnectionprotected OHttpRequestprotected OHttpResponseFields inherited from class com.orientechnologies.orient.server.network.protocol.ONetworkProtocol
serverFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconfig(OServerNetworkListener iListener, OServer iServer, Socket iSocket, OContextConfiguration iConfiguration) protected voidprotected voidprotected StringdeCompress(byte[] zipBytes) protected voidexecute()String[]static StringgetCommandString(String command, String method) protected voidhandleError(Throwable e, OHttpRequest iRequest) protected voidreadAllContent(OHttpRequest iRequest) static voidregisterHandlers(Object caller, OServer server, OServerNetworkListener iListener, OHttpNetworkCommandManager cmdManager) protected voidregisterStatelessCommands(OServerNetworkListener iListener) protected voidsendError(int iCode, String iReason, String iHeaders, String iContentType, String iContent, boolean iKeepAlive) protected voidsendResponseHeaders(String iContentType, boolean iKeepAlive) voidprotected voidsendStatus(int iStatus, String iReason) protected voidsendTextContent(int iCode, String iReason, String iHeaders, String iContentType, String iContent, boolean iKeepAlive) voidservice()voidvoidsetResponseCharSet(String responseCharSet) voidshutdown()protected voidtimeout()protected voidMethods inherited from class com.orientechnologies.orient.server.network.protocol.ONetworkProtocol
executor, getListeningAddress, getServer, getType, getVersionMethods inherited from class com.orientechnologies.common.thread.OSoftThread
afterExecution, beforeExecution, isShutdownFlag, run, setDumpExceptions, softShutdown, startupMethods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Field Details
-
connection
-
channel
-
account
-
request
-
response
-
cmdManager
-
-
Constructor Details
-
ONetworkProtocolHttpAbstract
-
-
Method Details
-
config
public void config(OServerNetworkListener iListener, OServer iServer, Socket iSocket, OContextConfiguration iConfiguration) throws IOException - Specified by:
configin classONetworkProtocol- Throws:
IOException
-
service
- Throws:
ONetworkProtocolExceptionIOException
-
sendShutdown
public void sendShutdown()- Overrides:
sendShutdownin classOSoftThread
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceOService- Overrides:
shutdownin classOSoftThread
-
getRequest
-
getResponse
-
getChannel
- Specified by:
getChannelin classONetworkProtocol
-
getAccount
-
getSessionID
-
getResponseCharSet
-
setResponseCharSet
-
getAdditionalResponseHeaders
-
getCommandManager
-
handleError
-
sendTextContent
protected void sendTextContent(int iCode, String iReason, String iHeaders, String iContentType, String iContent, boolean iKeepAlive) throws IOException - Throws:
IOException
-
sendError
protected void sendError(int iCode, String iReason, String iHeaders, String iContentType, String iContent, boolean iKeepAlive) throws IOException - Throws:
IOException
-
writeLine
- Throws:
IOException
-
sendStatus
- Throws:
IOException
-
sendResponseHeaders
- Throws:
IOException
-
readAllContent
- Throws:
IOException
-
execute
- Specified by:
executein classOSoftThread- Throws:
Exception
-
deCompress
-
connectionClosed
protected void connectionClosed() -
timeout
protected void timeout() -
connectionError
protected void connectionError() -
registerHandlers
public static void registerHandlers(Object caller, OServer server, OServerNetworkListener iListener, OHttpNetworkCommandManager cmdManager) -
registerStatelessCommands
-
getConnection
-
getCommandString
-
getRemoteAddress
- Specified by:
getRemoteAddressin interfaceONetworkHttpExecutor
-
setDatabase
- Specified by:
setDatabasein interfaceONetworkHttpExecutor
-