public LensMLClient(LensClient lensClient) { client = new LensMLJerseyClient(lensClient.getConnection(), lensClient .getConnection().getSessionHandle()); }
/** * Instantiates a new sample queries. * * @throws JAXBException the JAXB exception */ public SampleQueries() throws JAXBException { metaClient = new LensMetadataClient(LensClientSingletonWrapper.instance().getClient().getConnection()); queryClient = new LensStatement(LensClientSingletonWrapper.instance().getClient().getConnection()); }
public SampleMetastore() throws JAXBException { metaClient = new LensMetadataClient(LensClientSingletonWrapper.instance().getClient().getConnection()); }
public PopulateSampleMetastore() throws JAXBException { metaClient = new LensMetadataClient(LensClientSingletonWrapper.instance().getClient().getConnection()); }
/** * Get the current session handle */ @CliCommand(value = {"session"}, help = "Print the current session handle") public String getSessionHandle() { LensSessionHandle sessionHandle = getClient().getConnection().getSessionHandle(); if (sessionHandle != null) { return "Session Handle: " + sessionHandle.getPublicId(); } else { return "Session not established"; } }
/** * Get the current session handle */ @CliCommand(value = {"session"}, help = "Print the current session handle") public String getSessionHandle() { LensSessionHandle sessionHandle = getClient().getConnection().getSessionHandle(); if (sessionHandle != null) { return "Session Handle: " + sessionHandle.getPublicId(); } else { return "Session not established"; } }
/** * Test CLI command to get session handle */ @Test public void testGetSessionHandle() { LensConnectionCommands commands = new LensConnectionCommands(); try (LensClient client = new LensClient()) { commands.setClient(client); LensSessionHandle sessionHandle = client.getConnection().getSessionHandle(); Assert.assertNotNull(sessionHandle); String output = commands.getSessionHandle(); Assert.assertTrue(output.contains(sessionHandle.getPublicId().toString()), "session handle output: " + output); } } }