
public class ONetworkProtocolBinary extends ONetworkProtocol
| Modifier and Type | Field and Description |
|---|---|
protected com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary |
channel |
protected int |
clientTxId |
protected java.util.logging.Level |
logClientExceptions |
protected boolean |
logClientFullStackTrace |
protected boolean |
okSent |
protected int |
requestType |
server| Constructor and Description |
|---|
ONetworkProtocolBinary(OServer server) |
ONetworkProtocolBinary(OServer server,
java.lang.String iThreadName) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterOperationRequest(OClientConnection connection) |
protected void |
beginResponse() |
protected void |
checkServerAccess(java.lang.String iResource,
OClientConnection connection) |
void |
config(OServerNetworkListener iListener,
OServer iServer,
java.net.Socket iSocket,
com.orientechnologies.orient.core.config.OContextConfiguration iConfig) |
protected void |
endResponse() |
protected void |
execute() |
OBinaryRequestExecutor |
executor(OClientConnection connection) |
com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary |
getChannel() |
static byte[] |
getRecordBytes(OClientConnection connection,
com.orientechnologies.orient.core.record.ORecord iRecord) |
static java.lang.String |
getRecordSerializerName(OClientConnection connection) |
java.lang.String |
getRemoteAddress() |
int |
getRequestType() |
java.lang.String |
getType() |
int |
getVersion() |
protected void |
handleConnectionError(OClientConnection connection,
java.lang.Throwable e) |
void |
initVariables(OServer server,
com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary channel)
Internal varialbe injection useful for testing.
|
OBinaryPushResponse |
push(OBinaryPushRequest request) |
protected void |
sendError(OClientConnection connection,
int iClientTxId,
java.lang.Throwable t) |
protected void |
sendErrorOrDropConnection(OClientConnection connection,
int iClientTxId,
java.lang.Throwable t) |
protected void |
sendOk(OClientConnection connection,
int iClientTxId) |
protected void |
setDataCommandInfo(OClientConnection connection,
java.lang.String iCommandInfo) |
void |
setHandshakeInfo(HandshakeInfo handshakeInfo) |
boolean |
shouldReadToken(OClientConnection connection,
int requestType) |
void |
shutdown() |
void |
startup() |
protected static int |
trimCsvSerializedContent(OClientConnection connection,
byte[] stream) |
static void |
writeIdentifiable(com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary channel,
OClientConnection connection,
com.orientechnologies.orient.core.db.record.OIdentifiable o)
Write a OIdentifiable instance using this format:
- 2 bytes: class id [-2=no record, -3=rid, -1=no class id, > -1 = valid] - 1 byte: record type [d,b,f] - 2 bytes: cluster id - 8 bytes: position in cluster - 4 bytes: record version - x bytes: record content |
getListeningAddress, getServerafterExecution, beforeExecution, isShutdownFlag, run, sendShutdown, setDumpExceptions, softShutdownactiveCount, 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, yieldprotected final java.util.logging.Level logClientExceptions
protected final boolean logClientFullStackTrace
protected com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary channel
protected volatile int requestType
protected int clientTxId
protected boolean okSent
public ONetworkProtocolBinary(OServer server)
public ONetworkProtocolBinary(OServer server, java.lang.String iThreadName)
public void initVariables(OServer server, com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary channel)
public void config(OServerNetworkListener iListener, OServer iServer, java.net.Socket iSocket, com.orientechnologies.orient.core.config.OContextConfiguration iConfig) throws java.io.IOException
config in class ONetworkProtocoljava.io.IOExceptionpublic void startup()
startup in interface com.orientechnologies.common.util.OServicestartup in class com.orientechnologies.common.thread.OSoftThreadpublic void shutdown()
shutdown in interface com.orientechnologies.common.util.OServiceshutdown in class com.orientechnologies.common.thread.OSoftThreadprotected void execute()
throws java.lang.Exception
execute in class com.orientechnologies.common.thread.OSoftThreadjava.lang.Exceptionpublic void setHandshakeInfo(HandshakeInfo handshakeInfo)
public boolean shouldReadToken(OClientConnection connection, int requestType)
protected void afterOperationRequest(OClientConnection connection)
protected void checkServerAccess(java.lang.String iResource,
OClientConnection connection)
protected void sendError(OClientConnection connection, int iClientTxId, java.lang.Throwable t) throws java.io.IOException
java.io.IOExceptionprotected void beginResponse()
protected void endResponse()
throws java.io.IOException
java.io.IOExceptionprotected void setDataCommandInfo(OClientConnection connection, java.lang.String iCommandInfo)
protected void sendOk(OClientConnection connection, int iClientTxId) throws java.io.IOException
java.io.IOExceptionprotected void handleConnectionError(OClientConnection connection, java.lang.Throwable e)
public static java.lang.String getRecordSerializerName(OClientConnection connection)
public int getVersion()
getVersion in class ONetworkProtocolpublic com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary getChannel()
getChannel in class ONetworkProtocolpublic static void writeIdentifiable(com.orientechnologies.orient.enterprise.channel.binary.OChannelBinary channel,
OClientConnection connection,
com.orientechnologies.orient.core.db.record.OIdentifiable o)
throws java.io.IOException
channel - TODOjava.io.IOExceptionpublic java.lang.String getType()
getType in class ONetworkProtocolprotected void sendErrorOrDropConnection(OClientConnection connection, int iClientTxId, java.lang.Throwable t) throws java.io.IOException
java.io.IOExceptionpublic static byte[] getRecordBytes(OClientConnection connection, com.orientechnologies.orient.core.record.ORecord iRecord)
protected static int trimCsvSerializedContent(OClientConnection connection, byte[] stream)
public int getRequestType()
public java.lang.String getRemoteAddress()
public OBinaryRequestExecutor executor(OClientConnection connection)
executor in class ONetworkProtocolpublic OBinaryPushResponse push(OBinaryPushRequest request) throws java.io.IOException
java.io.IOExceptionCopyright © 2009–2022 OrientDB. All rights reserved.