Search in sources :

Example 1 with OStorageRemoteNodeSession

use of com.orientechnologies.orient.client.remote.OStorageRemoteNodeSession in project orientdb by orientechnologies.

the class OChannelBinaryAsynchClient method beginRequest.

public void beginRequest(final byte iCommand, final OStorageRemoteSession session) throws IOException {
    final OStorageRemoteNodeSession nodeSession = session.getServerSession(getServerURL());
    if (nodeSession == null)
        throw new OIOException("Invalid session for URL '" + getServerURL() + "'");
    writeByte(iCommand);
    writeInt(nodeSession.getSessionId());
    if (nodeSession.getToken() != null) {
        // if (!session.hasConnection(this) || true) {
        writeBytes(nodeSession.getToken());
    // session.addConnection(this);
    // } else
    // writeBytes(new byte[] {});
    }
}
Also used : OStorageRemoteNodeSession(com.orientechnologies.orient.client.remote.OStorageRemoteNodeSession) OIOException(com.orientechnologies.common.io.OIOException)

Aggregations

OIOException (com.orientechnologies.common.io.OIOException)1 OStorageRemoteNodeSession (com.orientechnologies.orient.client.remote.OStorageRemoteNodeSession)1