All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.tinkerpop.rexster.protocol.msg.SessionRequestMessage Maven / Gradle / Ivy

There is a newer version: 2.6.0
Show newest version
package com.tinkerpop.rexster.protocol.msg;

import org.msgpack.annotation.Message;

/**
 * Represents a request to open or close a session.
 *
 * @author Stephen Mallette (http://stephen.genoprime.com)
 */
@Message
public class SessionRequestMessage extends RexProMessage {
    public static final byte CHANNEL_NONE = 0;
    public static final byte CHANNEL_CONSOLE = 1;
    public static final byte CHANNEL_MSGPACK = 2;
    public static final byte CHANNEL_GRAPHSON = 3;

    public byte Channel;
    public String Username;
    public String Password;

    @Override
    public int estimateMessageSize() {
        return BASE_MESSAGE_SIZE + 1
                + (Username == null ? 0 : Username.length())
                + (Password == null ? 0 :Password.length());
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy