explicit-ask


License

License

GroupId

GroupId

rocks.heikoseeberger
ArtifactId

ArtifactId

explicit-ask_2.12
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

explicit-ask
explicit-ask
Project Organization

Project Organization

Heiko Seeberger

Download explicit-ask_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/rocks.heikoseeberger/explicit-ask_2.12/ -->
<dependency>
    <groupId>rocks.heikoseeberger</groupId>
    <artifactId>explicit-ask_2.12</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/rocks.heikoseeberger/explicit-ask_2.12/
implementation 'rocks.heikoseeberger:explicit-ask_2.12:1.0.0'
// https://jarcasting.com/artifacts/rocks.heikoseeberger/explicit-ask_2.12/
implementation ("rocks.heikoseeberger:explicit-ask_2.12:1.0.0")
'rocks.heikoseeberger:explicit-ask_2.12:jar:1.0.0'
<dependency org="rocks.heikoseeberger" name="explicit-ask_2.12" rev="1.0.0">
  <artifact name="explicit-ask_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='rocks.heikoseeberger', module='explicit-ask_2.12', version='1.0.0')
)
libraryDependencies += "rocks.heikoseeberger" % "explicit-ask_2.12" % "1.0.0"
[rocks.heikoseeberger/explicit-ask_2.12 "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.4
com.typesafe.akka : akka-actor_2.12 jar 2.5.9

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
com.novocode : junit-interface jar 0.11

Project Modules

There are no modules declared in this project.

ExplicitAsk

This is a very little library providing a workaround for an issue with PatternCS.ask. Only needed until the issue is fixed in Akka.

Dependency configuration

  • Group ID: rocks.heikoseeberger
  • Artifact ID: explicit-ask
  • Version: 1.0.0

Usage

Here's a snippet from the tests which hopefully is self explanatory:

final String expected = "hello";

final ActorRef echo = system.actorOf(Props.create(Echo.class));
final CompletionStage<String> response = ExplicitAsk
        .explicitAsk(
                echo,
                replyTo -> new Echo.Message(expected, replyTo),
                Timeout.apply(1, SECONDS))
        .thenApply(o -> (String)o);

final String actual = response.toCompletableFuture().get(1, SECONDS);
assertEquals(expected, actual);

Contribution policy

Contributions via GitHub pull requests are gladly accepted from their original author. Along with any pull requests, please state that the contribution is your original work and that you license the work to the project under the project's open source license. Whether or not you state this explicitly, by submitting any copyrighted material via pull request, email, or other means you agree to license the material under the project's open source license and warrant that you have the legal authority to do so.

License

This code is open source software licensed under the Apache-2.0 license.

Versions

Version
1.0.0