-
Notifications
You must be signed in to change notification settings - Fork 869
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
removed not needed information from open response
- Loading branch information
Showing
4 changed files
with
101 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
client/src/main/java/com/orientechnologies/orient/client/remote/message/OOpenResponse37.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,48 @@ | |||
package com.orientechnologies.orient.client.remote.message; | |||
|
|||
import com.orientechnologies.orient.client.remote.OBinaryResponse; | |||
import com.orientechnologies.orient.client.remote.OStorageRemoteSession; | |||
import com.orientechnologies.orient.core.serialization.serializer.record.ORecordSerializer; | |||
import com.orientechnologies.orient.core.storage.OCluster; | |||
import com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryProtocol; | |||
import com.orientechnologies.orient.enterprise.channel.binary.OChannelDataInput; | |||
import com.orientechnologies.orient.enterprise.channel.binary.OChannelDataOutput; | |||
|
|||
import java.io.IOException; | |||
import java.util.Collection; | |||
|
|||
/** | |||
* Created by tglman on 09/05/17. | |||
*/ | |||
public class OOpenResponse37 implements OBinaryResponse { | |||
private int sessionId; | |||
private byte[] sessionToken; | |||
|
|||
public OOpenResponse37() { | |||
} | |||
|
|||
public OOpenResponse37(int sessionId, byte[] sessionToken) { | |||
this.sessionId = sessionId; | |||
this.sessionToken = sessionToken; | |||
} | |||
|
|||
@Override | |||
public void write(OChannelDataOutput channel, int protocolVersion, ORecordSerializer serializer) throws IOException { | |||
channel.writeInt(sessionId); | |||
channel.writeBytes(sessionToken); | |||
} | |||
|
|||
@Override | |||
public void read(OChannelDataInput network, OStorageRemoteSession session) throws IOException { | |||
sessionId = network.readInt(); | |||
sessionToken = network.readBytes(); | |||
} | |||
|
|||
public int getSessionId() { | |||
return sessionId; | |||
} | |||
|
|||
public byte[] getSessionToken() { | |||
return sessionToken; | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters