start

fun start(username: String, password: String, gracefulReconnect: GracefulReconnect? = null): CordaRPCConnection

Logs in to the target server and returns an active connection. The returned connection is a java.io.Closeable and can be used with a try-with-resources statement. If you don't use that, you should use the RPCConnection.notifyServerAndClose or RPCConnection.forceClose methods to dispose of the connection object when done.

Parameters

username

The username to authenticate with.

password

The password to authenticate with.

gracefulReconnect

a GracefulReconnect class containing callback logic when the RPC is dis/reconnected unexpectedly

Throws

if the server version is too low or if the server isn't reachable within a reasonable timeout.


fun start(username: String, password: String, targetLegalIdentity: <Error class: unknown class>, gracefulReconnect: GracefulReconnect? = null): CordaRPCConnection

Logs in to the target server and returns an active connection. The returned connection is a java.io.Closeable and can be used with a try-with-resources statement. If you don't use that, you should use the RPCConnection.notifyServerAndClose or RPCConnection.forceClose methods to dispose of the connection object when done.

Parameters

username

The username to authenticate with.

password

The password to authenticate with.

targetLegalIdentity

in case of multi-identity RPC endpoint specific legal identity to which the calls must be addressed.

gracefulReconnect

a GracefulReconnect class containing callback logic when the RPC is dis/reconnected unexpectedly

Throws

if the server version is too low or if the server isn't reachable within a reasonable timeout.


fun start(username: String, password: String, externalTrace: <Error class: unknown class>?, impersonatedActor: <Error class: unknown class>?, gracefulReconnect: GracefulReconnect? = null): CordaRPCConnection

Logs in to the target server and returns an active connection. The returned connection is a java.io.Closeable and can be used with a try-with-resources statement. If you don't use that, you should use the RPCConnection.notifyServerAndClose or RPCConnection.forceClose methods to dispose of the connection object when done.

Parameters

username

The username to authenticate with.

password

The password to authenticate with.

externalTrace

external Trace for correlation.

impersonatedActor

the actor on behalf of which all the invocations will be made.

gracefulReconnect

a GracefulReconnect class containing callback logic when the RPC is dis/reconnected unexpectedly

Throws

if the server version is too low or if the server isn't reachable within a reasonable timeout.


fun start(username: String, password: String, externalTrace: <Error class: unknown class>?, impersonatedActor: <Error class: unknown class>?, targetLegalIdentity: <Error class: unknown class>?, gracefulReconnect: GracefulReconnect? = null): CordaRPCConnection

Logs in to the target server and returns an active connection. The returned connection is a java.io.Closeable and can be used with a try-with-resources statement. If you don't use that, you should use the RPCConnection.notifyServerAndClose or RPCConnection.forceClose methods to dispose of the connection object when done.

Parameters

username

The username to authenticate with.

password

The password to authenticate with.

externalTrace

external Trace for correlation.

impersonatedActor

the actor on behalf of which all the invocations will be made.

targetLegalIdentity

in case of multi-identity RPC endpoint specific legal identity to which the calls must be addressed.

gracefulReconnect

a GracefulReconnect class containing callback logic when the RPC is dis/reconnected unexpectedly. Note that when using graceful reconnect the values for CordaRPCClientConfiguration.connectionMaxRetryInterval and CordaRPCClientConfiguration.maxReconnectAttempts will be overridden in order to mangage the reconnects.

Throws

if the server version is too low or if the server isn't reachable within a reasonable timeout.