Package com.tinkerpop.rexster.client

Examples of com.tinkerpop.rexster.client.RexsterClient.execute()


            scriptMessage.metaSetGraphName(entry.getKey());
            scriptMessage.metaSetGraphObjName("graph");
            scriptMessage.setRequestAsUUID(UUID.randomUUID());
            scriptMessage.Session = null;

            RexProMessage inMsg = client.execute(scriptMessage);
            Assert.assertTrue(inMsg instanceof ScriptResponseMessage);
            Assert.assertTrue(((ScriptResponseMessage) inMsg).Results.get() != null);
        }
    }
View Full Code Here


        for (Map.Entry<String, Map<String,String>> entry : getAvailableGraphs(client).entrySet()) {
            final SessionRequestMessage outMsg = new SessionRequestMessage();
            outMsg.setRequestAsUUID(UUID.randomUUID());
            outMsg.metaSetGraphName(entry.getKey());

            RexProMessage inMsg = client.execute(outMsg);
            Assert.assertNotNull(inMsg.Session);
            Assert.assertTrue(inMsg instanceof SessionResponseMessage);

            UUID sessionKey = BitWorks.convertByteArrayToUUID(inMsg.Session);
View Full Code Here

            scriptMessage.LanguageName = "groovy";
            scriptMessage.metaSetInSession(true);
            scriptMessage.setRequestAsUUID(UUID.randomUUID());
            scriptMessage.setSessionAsUUID(sessionKey);

            inMsg = client.execute(scriptMessage);
            Assert.assertTrue(inMsg instanceof ScriptResponseMessage);
            Assert.assertTrue(((ScriptResponseMessage) inMsg).Results.get() != null);

            final ScriptRequestMessage scriptMessage2 = new ScriptRequestMessage();
            scriptMessage2.Script = "o";
View Full Code Here

            scriptMessage2.LanguageName = "groovy";
            scriptMessage2.metaSetInSession(true);
            scriptMessage2.setRequestAsUUID(UUID.randomUUID());
            scriptMessage2.setSessionAsUUID(sessionKey);

            inMsg = client.execute(scriptMessage2);
            Assert.assertNotNull(inMsg.Session);
            Assert.assertTrue(inMsg instanceof ErrorResponseMessage);
            Assert.assertEquals(((ErrorResponseMessage) inMsg).metaGetFlag(), ErrorResponseMessage.SCRIPT_FAILURE_ERROR);
        }
    }
View Full Code Here

        for (Map.Entry<String, Map<String,String>> entry : getAvailableGraphs(client).entrySet()) {
            //create a session
            final SessionRequestMessage outMsg = new SessionRequestMessage();
            outMsg.setRequestAsUUID(UUID.randomUUID());

            inMsg = client.execute(outMsg);
            Assert.assertNotNull(inMsg.Session);
            Assert.assertTrue(inMsg instanceof SessionResponseMessage);

            UUID sessionKey = BitWorks.convertByteArrayToUUID(inMsg.Session);
View Full Code Here

            scriptMessage.metaSetInSession(true);
            scriptMessage.metaSetGraphName(entry.getKey());
            scriptMessage.setRequestAsUUID(UUID.randomUUID());
            scriptMessage.Session = BitWorks.convertUUIDToByteArray(sessionKey);

            inMsg = client.execute(scriptMessage);
            Assert.assertTrue(inMsg instanceof ScriptResponseMessage);
            Assert.assertTrue(((ScriptResponseMessage) inMsg).Results.get() != null);

            // test that it's not available on the next request
            // if the meta flag is not set
View Full Code Here

            scriptMessage2.LanguageName = "groovy";
            scriptMessage2.metaSetInSession(true);
            scriptMessage2.setRequestAsUUID(UUID.randomUUID());
            scriptMessage2.Session = BitWorks.convertUUIDToByteArray(sessionKey);

            inMsg = client.execute(scriptMessage2);
            Assert.assertTrue(inMsg instanceof ErrorResponseMessage);
            Assert.assertEquals(((ErrorResponseMessage) inMsg).metaGetFlag(), ErrorResponseMessage.SCRIPT_FAILURE_ERROR);
        }
    }
View Full Code Here

            //create a session
            final SessionRequestMessage outMsg = new SessionRequestMessage();
            outMsg.setRequestAsUUID(UUID.randomUUID());
            outMsg.metaSetGraphName(entry.getKey());

            RexProMessage inMsg = client.execute(outMsg);
            Assert.assertNotNull(inMsg.Session);
            Assert.assertTrue(inMsg instanceof SessionResponseMessage);

            UUID sessionKey = BitWorks.convertByteArrayToUUID(inMsg.Session);
View Full Code Here

            scriptMessage.metaSetInSession(true);
            scriptMessage.metaSetGraphName("emptygraph");
            scriptMessage.setRequestAsUUID(UUID.randomUUID());
            scriptMessage.Session = BitWorks.convertUUIDToByteArray(sessionKey);

            inMsg = client.execute(scriptMessage);
            Assert.assertNotNull(inMsg.Session);
            Assert.assertTrue(inMsg instanceof ErrorResponseMessage);
            Assert.assertEquals(ErrorResponseMessage.GRAPH_CONFIG_ERROR, ((ErrorResponseMessage) inMsg).metaGetFlag());
        }
    }
View Full Code Here

        scriptMessage.metaSetGraphName("undefined");
        scriptMessage.metaSetGraphObjName("graph");
        scriptMessage.setRequestAsUUID(UUID.randomUUID());
        scriptMessage.Session = null;

        RexProMessage inMsg = client.execute(scriptMessage);
        Assert.assertTrue(inMsg instanceof ErrorResponseMessage);
        Assert.assertEquals(((ErrorResponseMessage) inMsg).metaGetFlag(), ErrorResponseMessage.GRAPH_CONFIG_ERROR);
    }

    /**
 
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.