final class CommandClient extends AnyRef
Enables easy access to command services and high level operations on top of them.
- Annotations
- @SuppressWarnings()
- Alphabetic
- By Inheritance
- CommandClient
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
CommandClient(commandSubmissionService: CommandSubmissionServiceStub, commandCompletionService: CommandCompletionServiceStub, ledgerId: LedgerId, applicationId: String, config: CommandClientConfiguration, timeProviderO: Option[TimeProvider] = None)(implicit esf: ExecutionSequencerFactory)
- commandSubmissionService
gRPC service reference.
- commandCompletionService
gRPC service reference.
- ledgerId
Will be applied to submitted commands.
- applicationId
Will be applied to submitted commands.
- config
Options for changing behavior.
- timeProviderO
If defined, it will be used to override LET and MRT values on incoming commands. Let will be set based on current time, and TTL will stay the same or be adjusted based on config
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def completionSource(parties: Seq[String], offset: LedgerOffset, token: Option[String] = None): Source[CompletionStreamElement, NotUsed]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getCompletionEnd(token: Option[String] = None): Future[CompletionEndResponse]
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def submissionFlow[Context](token: Option[String] = None): Flow[Ctx[Context, SubmitRequest], Ctx[Context, Try[Empty]], NotUsed]
-
def
submitSingleCommand(submitRequest: SubmitRequest, token: Option[String] = None): Future[Empty]
Submit a single command.
Submit a single command. Successful result does not guarantee that the resulting transaction has been written to the ledger. In order to get that semantic, use trackCommands or trackCommandsUnbounded.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
trackCommands[Context](parties: Seq[String], token: Option[String] = None)(implicit ec: ExecutionContext): Future[Flow[Ctx[Context, SubmitRequest], Ctx[Context, Completion], Materialized[NotUsed, Context]]]
Tracks the results (including timeouts) of incoming commands.
Tracks the results (including timeouts) of incoming commands. Applies a maximum bound for in-flight commands which have been submitted, but not confirmed through command completions.
- parties
Commands that have a submitting party which is not part of this collection will fail the stream.
-
def
trackCommandsUnbounded[Context](parties: Seq[String], token: Option[String] = None)(implicit ec: ExecutionContext): Future[Flow[Ctx[Context, SubmitRequest], Ctx[Context, Completion], Materialized[NotUsed, Context]]]
Tracks the results (including timeouts) of incoming commands.
Tracks the results (including timeouts) of incoming commands.
- parties
Commands that have a submitting party which is not part of this collection will fail the stream.
-
def
trackSingleCommand(submitRequest: SubmitRequest, token: Option[String] = None)(implicit mat: Materializer): Future[Completion]
Submits and tracks a single command.
Submits and tracks a single command. High frequency usage is discouraged as it causes a dedicated completion stream to be established and torn down.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
withTimeProvider(newProvider: Option[TimeProvider]): CommandClient
Returns a new CommandClient which will update ledger effective times and maximum record times based on the new time provider.