
public class ONetworkProtocolBinary extends ONetworkProtocol
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected OChannelBinary |
channel |
protected int |
clientTxId |
protected Level |
logClientExceptions |
protected boolean |
logClientFullStackTrace |
protected boolean |
okSent |
protected int |
requestType |
serverMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
ONetworkProtocolBinary(OServer server) |
ONetworkProtocolBinary(OServer server,
String iThreadName) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterOperationRequest(OClientConnection connection) |
protected void |
beginResponse() |
protected void |
checkServerAccess(String iResource,
OClientConnection connection) |
void |
config(OServerNetworkListener iListener,
OServer iServer,
Socket iSocket,
OContextConfiguration iConfig) |
protected void |
endResponse() |
protected void |
execute() |
OBinaryRequestExecutor |
executor(OClientConnection connection) |
OChannelBinary |
getChannel() |
static byte[] |
getRecordBytes(OClientConnection connection,
ORecord iRecord) |
static String |
getRecordSerializerName(OClientConnection connection) |
String |
getRemoteAddress() |
int |
getRequestType() |
String |
getType() |
int |
getVersion() |
protected void |
handleConnectionError(OClientConnection connection,
Throwable e) |
void |
initVariables(OServer server,
OChannelBinary channel)
Internal varialbe injection useful for testing.
|
OBinaryPushResponse |
push(OBinaryPushRequest request) |
protected void |
sendError(OClientConnection connection,
int iClientTxId,
Throwable t) |
protected void |
sendErrorOrDropConnection(OClientConnection connection,
int iClientTxId,
Throwable t) |
protected void |
sendOk(OClientConnection connection,
int iClientTxId) |
protected void |
setDataCommandInfo(OClientConnection connection,
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(OChannelBinary channel,
OClientConnection connection,
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 Level logClientExceptions
protected final boolean logClientFullStackTrace
protected OChannelBinary channel
protected volatile int requestType
protected int clientTxId
protected boolean okSent
public ONetworkProtocolBinary(OServer server)
public void initVariables(OServer server, OChannelBinary channel)
public void config(OServerNetworkListener iListener, OServer iServer, Socket iSocket, OContextConfiguration iConfig) throws IOException
config in class ONetworkProtocolIOExceptionpublic void startup()
startup in interface OServicestartup in class OSoftThreadpublic void shutdown()
shutdown in interface OServiceshutdown in class OSoftThreadprotected void execute()
throws Exception
execute in class OSoftThreadExceptionpublic void setHandshakeInfo(HandshakeInfo handshakeInfo)
public boolean shouldReadToken(OClientConnection connection, int requestType)
protected void afterOperationRequest(OClientConnection connection)
protected void checkServerAccess(String iResource, OClientConnection connection)
protected void sendError(OClientConnection connection, int iClientTxId, Throwable t) throws IOException
IOExceptionprotected void beginResponse()
protected void endResponse()
throws IOException
IOExceptionprotected void setDataCommandInfo(OClientConnection connection, String iCommandInfo)
protected void sendOk(OClientConnection connection, int iClientTxId) throws IOException
IOExceptionprotected void handleConnectionError(OClientConnection connection, Throwable e)
public static String getRecordSerializerName(OClientConnection connection)
public int getVersion()
getVersion in class ONetworkProtocolpublic OChannelBinary getChannel()
getChannel in class ONetworkProtocolpublic static void writeIdentifiable(OChannelBinary channel, OClientConnection connection, OIdentifiable o) throws IOException
channel - TODOIOExceptionpublic String getType()
getType in class ONetworkProtocolprotected void sendErrorOrDropConnection(OClientConnection connection, int iClientTxId, Throwable t) throws IOException
IOExceptionpublic static byte[] getRecordBytes(OClientConnection connection, ORecord iRecord)
protected static int trimCsvSerializedContent(OClientConnection connection, byte[] stream)
public int getRequestType()
public String getRemoteAddress()
public OBinaryRequestExecutor executor(OClientConnection connection)
executor in class ONetworkProtocolpublic OBinaryPushResponse push(OBinaryPushRequest request) throws IOException
IOExceptionCopyright © 2009–2025 OrientDB. All rights reserved.