Connection
Manages a connection between the Endpoint and the Bridge server.
Static Methods
connect
Connects to PrivMX Bridge server.
Params
userPrivKey
String
user's private key
solutionId
String
ID of the Solution
bridgeUrl
String
Bridge Server URL
Returns
Connection
·
Connection object
connect
Connects to PrivMX Bridge server.
Params
userPrivKey
String
user's private key
solutionId
String
ID of the Solution
bridgeUrl
String
Bridge Server URL
verificationOptions
PKIVerificationOptions
PrivMX Bridge server instance verification options using a PKI server
Returns
Connection
·
Connection object
connectPublic
Connects to PrivMX Bridge server as a guest user.
Params
solutionId
String
ID of the Solution
bridgeUrl
String
Bridge Server URL
Returns
Connection
·
Connection object
connectPublic
Connects to PrivMX Bridge server as a guest user.
Params
solutionId
String
ID of the Solution
bridgeUrl
String
Bridge Server URL
verificationOptions
PKIVerificationOptions
PrivMX Bridge server instance verification options using a PKI server
Returns
Connection
·
Connection object
platformConnect
Connects to PrivMX Bridge server.
Params
userPrivKey
String
user's private key
solutionId
String
ID of the Solution
platformUrl
String
Platform's Endpoint URL
Returns
Connection
·
Connection object
platformConnectPublic
Connects to PrivMX Bridge server as a guest user.
Params
solutionId
String
ID of the Solution
platformUrl
String
Platform's Endpoint URL
Returns
Connection
·
Connection object
setCertsPath
Allows to set path to the SSL certificate file.
Params
certsPath
String
path to file
Methods
close
If there is an active connection then it disconnects from PrivMX Bridge and frees memory making this instance not reusable.
disconnect
Disconnects from PrivMX Bridge server.
getConnectionId
Gets the ID of the current connection.
Returns
Long
·
ID of the connection
getContextUsers
Gets a list of users of given context.
Params
contextId
String
ID of the context
Returns
List<UserInfo>
·
list of users Info
listContexts
Gets a list of Contexts available for the user.
Params
skip
long
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)
Returns
PagingList<Context>
·
list of Contexts
listContexts
Gets a list of Contexts available for the user.
Params
skip
long
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
Returns
PagingList<Context>
·
list of Contexts
listContexts
Gets a list of Contexts available for the user.
Params
skip
long
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
queryAsJson
String
stringified JSON object with a custom field to filter result
Returns
PagingList<Context>
·
list of Contexts
listContexts
Gets a list of Contexts available for the user.
Params
skip
long
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
queryAsJson
String
stringified JSON object with a custom field to filter result
sortBy
String
field name to sort elements by
Returns
PagingList<Context>
·
list of Contexts
setUserVerifier
Sets user's custom verification callback.
The feature allows the developer to set up a callback for user verification. A developer can implement an interface and pass the implementation to the function. Each time data is read from the container, a callback will be triggered, allowing the developer to validate the sender in an external service, e.g. Developer's Application Server or PKI Server.
Params
userVerifier
UserVerifierInterface
an implementation of the UserVerifierInterface
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.