PrivMX DOCS
API Reference/PrivMX Endpoint Java/Core

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

public static Connection connect(
String userPrivKey,
String solutionId,
String bridgeUrl
)

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

public static Connection connect(
String userPrivKey,
String solutionId,
String bridgeUrl,
PKIVerificationOptions verificationOptions
)

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

public static Connection connectPublic(
String solutionId,
String bridgeUrl
)

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

public static Connection connectPublic(
String solutionId,
String bridgeUrl,
PKIVerificationOptions verificationOptions
)

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

public static Connection platformConnect(
String userPrivKey,
String solutionId,
String platformUrl
)

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

public static Connection platformConnectPublic(
String solutionId,
String platformUrl
)

Returns

Connection · Connection object

setCertsPath

Allows to set path to the SSL certificate file.

Params

certsPath

String

path to file

public static void setCertsPath(
String certsPath
)

Methods

close

If there is an active connection then it disconnects from PrivMX Bridge and frees memory making this instance not reusable.

public void close()

disconnect

Disconnects from PrivMX Bridge server.

public void disconnect()

getConnectionId

Gets the ID of the current connection.

public Long getConnectionId()

Returns

Long · ID of the connection

getContextUsers

Gets a list of users of given context.

Params

contextId

String

ID of the context

public List<UserInfo> getContextUsers(
String contextId
)

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)

public PagingList<Context> listContexts(
long skip,
long limit,
String sortOrder
)

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

public PagingList<Context> listContexts(
long skip,
long limit,
String sortOrder,
String lastId
)

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

public PagingList<Context> listContexts(
long skip,
long limit,
String sortOrder,
String lastId,
String queryAsJson
)

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

public PagingList<Context> listContexts(
long skip,
long limit,
String sortOrder,
String lastId,
String queryAsJson,
String sortBy
)

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

public void setUserVerifier(
UserVerifierInterface userVerifier
)

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.