Package com.caucho.bam

Examples of com.caucho.bam.ActorClient


    return null;
  }

  private static ActorClient getActorClient(Env env)
  {
    ActorClient connection
      = (ActorClient) env.getSpecialValue("_quercus_bam_connection");

    // create a connection lazily
    if (connection == null) {
      HempBroker broker = HempBroker.getCurrent();
View Full Code Here


    BamPhpActor actor = getActor(env);

    if (actor != null)
      return actor.getLinkStream();

    ActorClient connection = getActorClient(env);

    return connection.getLinkStream();
  }
View Full Code Here

    BamPhpActor actor = getActor(env);

    if (actor != null)
      return actor.getJid();

    ActorClient connection = getActorClient(env);

    return connection.getJid();
  }
View Full Code Here

  //

  public String statusWatchdog()
    throws IOException
  {
    ActorClient conn = getConnection();

    try {
      ResultStatus status = (ResultStatus)
        conn.queryGet(WATCHDOG_JID, new WatchdogStatusQuery());

      if (status.isSuccess())
        return status.getMessage();

      throw new RuntimeException(L.l("{0}: watchdog status failed because of '{1}'",
View Full Code Here

        message = "Check the $RESIN_HOME/libexec or $RESIN_HOME/libexec64 directory for libresin_os.so.";
       
      throw new ConfigException(L.l("<group-name> requires compiled JNI.\n{0}", message));
    }

    ActorClient conn = null;

    try {
      conn = getConnection();

      ResultStatus status = (ResultStatus)
        conn.querySet(WATCHDOG_JID, new WatchdogStartQuery(argv), BAM_TIMEOUT);

      if (status.isSuccess())
        return;

      throw new ConfigException(L.l("{0}: watchdog start failed because of '{1}'",
                                    this, status.getMessage()));
    } catch (RemoteConnectionFailedException e) {
      log.log(Level.FINE, e.toString(), e);
    } catch (RuntimeException e) {
      throw e;
    } finally {
      if (conn != null)
        conn.close();
    }

    launchManager(argv);
  }
View Full Code Here

    launchManager(argv);
  }

  public void stopWatchdog()
  {
    ActorClient conn = getConnection();

    try {
      ResultStatus status = (ResultStatus)
        conn.querySet(WATCHDOG_JID, new WatchdogStopQuery(getId()), BAM_TIMEOUT);

      if (! status.isSuccess())
        throw new RuntimeException(L.l("{0}: watchdog stop failed because of '{1}'",
                                       this, status.getMessage()));
    } catch (RuntimeException e) {
View Full Code Here

  }

  public void killWatchdog()
    throws IOException
  {
    ActorClient conn = getConnection();

    try {
      ResultStatus status = (ResultStatus)
        conn.querySet(WATCHDOG_JID, new WatchdogKillQuery(getId()), BAM_TIMEOUT);

      if (! status.isSuccess())
        throw new RuntimeException(L.l("{0}: watchdog kill failed because of '{1}'",
                                       this, status.getMessage()));
    } catch (RuntimeException e) {
View Full Code Here

  }

  public boolean shutdown()
    throws IOException
  {
    ActorClient conn = getConnection();

    try {
      ResultStatus status = (ResultStatus)
        conn.querySet(WATCHDOG_JID, new WatchdogShutdownQuery(), BAM_TIMEOUT);

      if (! status.isSuccess())
        throw new RuntimeException(L.l("{0}: watchdog shutdown failed because of '{1}'",
                                       this, status.getMessage()));
    } catch (RuntimeException e) {
View Full Code Here

TOP

Related Classes of com.caucho.bam.ActorClient

Copyright © 2018 www.massapicom. 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.