Connection
Manages a connection between the Endpoint and the Bridge server.
Static Methods
platformConnect
Connects to the PrivMX Bridge server.
public static Connection platformConnect(
String userPrivKey,
String solutionId,
String platformUrl
)
Name | Type | Description |
---|---|---|
userPrivKey | String | user's private key |
solutionId | String | ID of the Solution |
platformUrl | String | Platform's Endpoint URL |
Type | Description |
---|---|
Connection | Connection object |
platformConnectPublic
Connects to the PrivMX Bridge server as a guest user.
public static Connection platformConnectPublic(
String solutionId,
String platformUrl
)
Name | Type | Description |
---|---|---|
solutionId | String | ID of the Solution |
platformUrl | String | Platform's Endpoint URL |
Type | Description |
---|---|
Connection | Connection object |
setCertsPath
Allows to set path to the SSL certificate file.
public static void setCertsPath(
String certsPath
)
Name | Type | Description |
---|---|---|
certsPath | String | path to file |
Methods
close
If there is an active connnection then it disconnects from PrivMX Bridge and frees memory making this instance not reusable.
public void close()
disconnect
Disconnects from the PrivMX Bridge server.
public void disconnect()
getConnectionId
Gets the ID of the current connection.
public Long getConnectionId()
Type | Description |
---|---|
Long | ID of the connection |
listContexts
Gets a list of Contexts available for the user.
public PagingList<Context> listContexts(
long skip,
long limit,
String sortOrder
)
Name | Type | Description |
---|---|---|
skip | long | skip number of elements to skip from result |
limit | long | limit of elements to return for query |
sortOrder | String | order of elements in result ("asc" for ascending, "desc" for descending) |
Type | Description |
---|---|
PagingList<Context> | list of Contexts |
listContexts
Gets a list of Contexts available for the user.
public PagingList<Context> listContexts(
long skip,
long limit,
String sortOrder,
String lastId
)
Name | Type | Description |
---|---|---|
skip | long | skip number of elements to skip from result |
limit | long | limit of elements to return for query |
sortOrder | String | order of elements in result ("asc" for ascending, "desc" for descending) |
lastId | String | ID of the element from which query results should start |
Type | Description |
---|---|
PagingList<Context> | list of Contexts |