public class LensConnection extends Object
Constructor and Description |
---|
LensConnection(LensConnectionParams params)
Construct a connection to lens server specified by connection parameters.
|
LensConnection(LensConnectionParams params,
LensSessionHandle sessionHandle)
Construct a connection to lens server specified by connection parameters with an already established session
|
Modifier and Type | Method and Description |
---|---|
APIResult |
addResourceToConnection(String type,
String resourcePath)
Adds the resource to connection.
|
APIResult |
attachDatabaseToSession()
Attach database to session.
|
javax.ws.rs.client.Client |
buildClient() |
APIResult |
close()
Close.
|
List<String> |
getConnectionParams() |
List<String> |
getConnectionParams(String key)
Gets the connection params.
|
javax.ws.rs.core.Response |
getLogs(String logFile)
get the logs for a given log file
|
javax.ws.rs.client.WebTarget |
getLogWebTarget() |
javax.ws.rs.client.WebTarget |
getLogWebTarget(javax.ws.rs.client.Client client) |
LensSessionHandle |
getSessionHandle()
The session handle.
|
boolean |
isOpen()
Check if the connection is opened.
|
List<String> |
listResourcesFromConnection(String type)
List resources from session
|
LensSessionHandle |
open(String password)
Open.
|
APIResult |
removeResourceFromConnection(String type,
String resourcePath)
Removes the resource from connection.
|
APIResult |
setConnectionParams(String key,
String value)
Sets the connection params.
|
String |
toString() |
public LensConnection(LensConnectionParams params)
params
- parameters to be used for creating a connectionpublic LensConnection(LensConnectionParams params, LensSessionHandle sessionHandle)
params
- parameters to be used for creating a connectionpublic boolean isOpen()
public javax.ws.rs.client.Client buildClient()
public javax.ws.rs.client.WebTarget getLogWebTarget()
public javax.ws.rs.client.WebTarget getLogWebTarget(javax.ws.rs.client.Client client)
public LensSessionHandle open(String password)
password
- the passwordpublic APIResult attachDatabaseToSession()
public APIResult close()
public APIResult addResourceToConnection(String type, String resourcePath)
type
- the typeresourcePath
- the resource pathpublic APIResult removeResourceFromConnection(String type, String resourcePath)
type
- the typeresourcePath
- the resource pathpublic List<String> listResourcesFromConnection(String type)
type
- type of resourcepublic javax.ws.rs.core.Response getLogs(String logFile)
logFile
- log segregationpublic APIResult setConnectionParams(String key, String value)
key
- the keyvalue
- the valuepublic List<String> getConnectionParams(String key)
key
- the key@Generated(value="lombok") public LensSessionHandle getSessionHandle()
Copyright © 2014–2015 Apache Software Foundation. All rights reserved.