Skip to main content
reference

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
)

NameTypeDescription
userPrivKeyStringuser's private key
solutionIdStringID of the Solution
platformUrlStringPlatform's Endpoint URL

TypeDescription
Connection Connection object

platformConnectPublic

Connects to the PrivMX Bridge server as a guest user.

public static Connection platformConnectPublic(
String solutionId,
String platformUrl
)

NameTypeDescription
solutionIdStringID of the Solution
platformUrlStringPlatform's Endpoint URL

TypeDescription
Connection Connection object

setCertsPath

Allows to set path to the SSL certificate file.

public static void setCertsPath(
String certsPath
)

NameTypeDescription
certsPathStringpath 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()

TypeDescription
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
)

NameTypeDescription
skiplongskip number of elements to skip from result
limitlonglimit of elements to return for query
sortOrderStringorder of elements in result ("asc" for ascending, "desc" for descending)

TypeDescription
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
)

NameTypeDescription
skiplongskip number of elements to skip from result
limitlonglimit of elements to return for query
sortOrderStringorder of elements in result ("asc" for ascending, "desc" for descending)
lastIdStringID of the element from which query results should start

TypeDescription
PagingList<Context> list of Contexts