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
buildSubscriptionQuery
Generate subscription Query for the Context events.
Params
eventType
CoreEventType
Type of event which you listen for
selectorType
CoreEventSelectorType
Scope on which you listen for events
selectorId
String
ID of the selector
Returns
String ·
Query for subscribing event
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
listContextUsers
Gets a list of users with their status and the last status change.
Params
contextId
String
ID of the Context
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<UserInfo> ·
List of users with their status and the last status change
listContextUsers
Gets a list of users with their status and the last status change.
Params
contextId
String
ID of the Context
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<UserInfo> ·
List of users with their status and the last status change
listContextUsers
Gets a list of users with their status and the last status change.
Params
contextId
String
ID of the Context
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<UserInfo> ·
List of users with their status and the last status change
listContextUsers
Gets a list of users with their status and the last status change.
Params
contextId
String
ID of the Context
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<UserInfo> ·
List of users with their status and the last status change
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
subscribeFor
Subscribe for the Context events on the given subscription query.
Params
subscriptionQueries
List<String>
List of queries
Returns
List<String> ·
List of subscriptionIds in matching order to subscriptionQueries
unsubscribeFrom
Unsubscribe from events for the given subscriptionId.
Params
subscriptionIds
List<String>
List of subscriptionId
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.