Package com.tinkerpop.rexster.protocol.serializer

Examples of com.tinkerpop.rexster.protocol.serializer.RexProSerializer.serialize()


        try {
            RexProSerializer serializer = getSerializer();
            if (responseMessage instanceof SessionResponseMessage) {
                responseBytes = serializer.serialize((SessionResponseMessage) responseMessage, SessionResponseMessage.class);
            } else if (responseMessage instanceof ErrorResponseMessage) {
                responseBytes = serializer.serialize((ErrorResponseMessage) responseMessage, ErrorResponseMessage.class);
            } else if (responseMessage instanceof ScriptResponseMessage) {
                responseBytes = serializer.serialize((ScriptResponseMessage) responseMessage, ScriptResponseMessage.class);
            } else {
                throw new Exception();
            }
View Full Code Here


            if (responseMessage instanceof SessionResponseMessage) {
                responseBytes = serializer.serialize((SessionResponseMessage) responseMessage, SessionResponseMessage.class);
            } else if (responseMessage instanceof ErrorResponseMessage) {
                responseBytes = serializer.serialize((ErrorResponseMessage) responseMessage, ErrorResponseMessage.class);
            } else if (responseMessage instanceof ScriptResponseMessage) {
                responseBytes = serializer.serialize((ScriptResponseMessage) responseMessage, ScriptResponseMessage.class);
            } else {
                throw new Exception();
            }

        } catch (Exception ex) {
View Full Code Here

            } else {
                throw new RexProException(String.format("unknown serializer type: %s", serializerType));
            }

            if (msg instanceof SessionResponseMessage) {
                rexProMessageAsBytes = serializer.serialize((SessionResponseMessage) msg, SessionResponseMessage.class);
            } else if (msg instanceof ErrorResponseMessage) {
                rexProMessageAsBytes = serializer.serialize((ErrorResponseMessage) msg, ErrorResponseMessage.class);
            } else if (msg instanceof ScriptRequestMessage) {
                rexProMessageAsBytes = serializer.serialize((ScriptRequestMessage) msg, ScriptRequestMessage.class);
            } else if (msg instanceof SessionRequestMessage) {
View Full Code Here

            }

            if (msg instanceof SessionResponseMessage) {
                rexProMessageAsBytes = serializer.serialize((SessionResponseMessage) msg, SessionResponseMessage.class);
            } else if (msg instanceof ErrorResponseMessage) {
                rexProMessageAsBytes = serializer.serialize((ErrorResponseMessage) msg, ErrorResponseMessage.class);
            } else if (msg instanceof ScriptRequestMessage) {
                rexProMessageAsBytes = serializer.serialize((ScriptRequestMessage) msg, ScriptRequestMessage.class);
            } else if (msg instanceof SessionRequestMessage) {
                rexProMessageAsBytes = serializer.serialize((SessionRequestMessage) msg, SessionRequestMessage.class);
            } else if (msg instanceof ScriptResponseMessage) {
View Full Code Here

            if (msg instanceof SessionResponseMessage) {
                rexProMessageAsBytes = serializer.serialize((SessionResponseMessage) msg, SessionResponseMessage.class);
            } else if (msg instanceof ErrorResponseMessage) {
                rexProMessageAsBytes = serializer.serialize((ErrorResponseMessage) msg, ErrorResponseMessage.class);
            } else if (msg instanceof ScriptRequestMessage) {
                rexProMessageAsBytes = serializer.serialize((ScriptRequestMessage) msg, ScriptRequestMessage.class);
            } else if (msg instanceof SessionRequestMessage) {
                rexProMessageAsBytes = serializer.serialize((SessionRequestMessage) msg, SessionRequestMessage.class);
            } else if (msg instanceof ScriptResponseMessage) {
                rexProMessageAsBytes = serializer.serialize((ScriptResponseMessage) msg, ScriptResponseMessage.class);
            }
View Full Code Here

            } else if (msg instanceof ErrorResponseMessage) {
                rexProMessageAsBytes = serializer.serialize((ErrorResponseMessage) msg, ErrorResponseMessage.class);
            } else if (msg instanceof ScriptRequestMessage) {
                rexProMessageAsBytes = serializer.serialize((ScriptRequestMessage) msg, ScriptRequestMessage.class);
            } else if (msg instanceof SessionRequestMessage) {
                rexProMessageAsBytes = serializer.serialize((SessionRequestMessage) msg, SessionRequestMessage.class);
            } else if (msg instanceof ScriptResponseMessage) {
                rexProMessageAsBytes = serializer.serialize((ScriptResponseMessage) msg, ScriptResponseMessage.class);
            }

        } catch (Exception ex) {
View Full Code Here

            } else if (msg instanceof ScriptRequestMessage) {
                rexProMessageAsBytes = serializer.serialize((ScriptRequestMessage) msg, ScriptRequestMessage.class);
            } else if (msg instanceof SessionRequestMessage) {
                rexProMessageAsBytes = serializer.serialize((SessionRequestMessage) msg, SessionRequestMessage.class);
            } else if (msg instanceof ScriptResponseMessage) {
                rexProMessageAsBytes = serializer.serialize((ScriptResponseMessage) msg, ScriptResponseMessage.class);
            }

        } catch (Exception ex) {
            // if there's an error during serialization with msgpack this could tank.  the script will already
            // have executed and likely committed with success.  just means the response won't get back cleanly
View Full Code Here

    private void serializeMessage() throws IOException {
        try {
            RexProSerializer serializer = getSerializer();
            if (responseMessage instanceof SessionResponseMessage) {
                responseBytes = serializer.serialize((SessionResponseMessage) responseMessage, SessionResponseMessage.class);
            } else if (responseMessage instanceof ErrorResponseMessage) {
                responseBytes = serializer.serialize((ErrorResponseMessage) responseMessage, ErrorResponseMessage.class);
            } else if (responseMessage instanceof ScriptResponseMessage) {
                responseBytes = serializer.serialize((ScriptResponseMessage) responseMessage, ScriptResponseMessage.class);
            } else {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.