Examples of watch()


Examples of akka.actor.Inbox.watch()

  public void demonstrateWatch() {
    final JavaTestKit probe = new JavaTestKit(system);
    final ActorRef target = probe.getRef();
    //#watch
    final Inbox inbox = Inbox.create(system);
    inbox.watch(target);
    target.tell(PoisonPill.getInstance(), ActorRef.noSender());
    try {
      assert inbox.receive(Duration.create(1, TimeUnit.SECONDS)) instanceof Terminated;
    } catch (java.util.concurrent.TimeoutException e) {
      // timeout
View Full Code Here

Examples of akka.testkit.JavaTestKit.watch()

      'lowpriority
      'lowpriority
    */
    //#prio-dispatcher

    probe.watch(myActor);
    probe.expectMsgClass(Terminated.class);
  }

  @Test
  public void controlAwareDispatcher() throws Exception {
View Full Code Here

Examples of akka.testkit.TestProbe.watch()

  @Test
  public void stopTest() throws Exception {

    ActorRef workerActor = supervisor.underlyingActor().childActor;
    TestProbe probe = new TestProbe(_system);
    probe.watch(workerActor);

    supervisor.tell(Long.parseLong("10"));

    probe.expectMsgClass(Terminated.class);
  }
View Full Code Here

Examples of co.paralleluniverse.actors.Actor.watch()

        else
            currentActor = Actor.currentActor();

        assert currentActor != null;

        final Object watch = currentActor.watch(actor);

        if (m.getId() == null)
            m.setId(watch);

        final Object id = m.getId();
View Full Code Here

Examples of co.paralleluniverse.actors.Actor.watch()

        else
            currentActor = Actor.currentActor();

        assert currentActor != null;

        final Object watch = currentActor.watch(actor);

        if (m.getId() == null)
            m.setId(watch);

        final Object id = m.getId();
View Full Code Here

Examples of co.paralleluniverse.actors.LocalActor.watch()

        else
            currentActor = LocalActor.self();

        assert currentActor != null;

        final Object watch = currentActor.watch(actor);

        if (m.getId() == null)
            m.setId(watch);

        final Object id = m.getId();
View Full Code Here

Examples of com.adito.agent.client.util.ProcessMonitor.watch()

          if(!hasErrored) {
              try {
          out = new FileOutputStream(FileCleaner.deleteOnExit(new File(launcher.getInstallDir(), launcher.getName() + ".out"))); //$NON-NLS-1$
          ProcessMonitor monitor = launcher.getApplicationType().getProcessMonitor();
          if (monitor != null) {
              monitor.watch(out, out);
          }
        } catch (Throwable e) {
        } finally {
                if (out != null) {
                    try {
View Full Code Here

Examples of com.atlassian.jira.rest.client.IssueRestClient.watch()

    final IssueRestClient issueClient = client.getIssueClient();
    final Issue issue1 = issueClient.getIssue("TST-1", pm);

    Assert.assertThat(issueClient.getWatchers(issue1.getWatchers().getSelf(), pm).getUsers(), not(hasItem(USER_ADMIN)));

    issueClient.watch(issue1.getWatchers().getSelf(), pm);
    Assert.assertThat(issueClient.getWatchers(issue1.getWatchers().getSelf(), pm).getUsers(), hasItem(USER_ADMIN));

    issueClient.unwatch(issue1.getWatchers().getSelf(), pm);
    Assert.assertThat(issueClient.getWatchers(issue1.getWatchers().getSelf(), pm).getUsers(), not(hasItem(USER_ADMIN)));
View Full Code Here

Examples of com.atlassian.jira.rest.client.IssueRestClient.watch()

  @Test
  public void testRemoveWatcherUnauthorized() {
    final IssueRestClient issueClient = client.getIssueClient();
    final Issue issue1 = issueClient.getIssue("TST-1", pm);
    issueClient.watch(issue1.getWatchers().getSelf(), pm);

    setUser1();
    final IssueRestClient issueClient2 = client.getIssueClient();
    assertErrorCode(Response.Status.UNAUTHORIZED,
        "User 'wseliga' is not allowed to remove watchers from issue 'TST-1'", new Runnable() {
View Full Code Here

Examples of com.atlassian.jira.rest.client.IssueRestClient.watch()

    setUser1();
    final IssueRestClient issueClient = client.getIssueClient();
    final Issue issue = issueClient.getIssue("TST-1", pm);
    Assert.assertThat(client.getIssueClient().getWatchers(issue.getWatchers().getSelf(), pm).getUsers(), hasItem(USER1));
    // JIRA allows to watch already watched issue by you - such action effectively has no effect
    issueClient.watch(issue.getWatchers().getSelf(), pm);
    Assert.assertThat(client.getIssueClient().getWatchers(issue.getWatchers().getSelf(), pm).getUsers(), hasItem(USER1));
  }

  @Test
  public void testAddWatcherUnauthorized() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.