Package com.caucho.bam.actor

Examples of com.caucho.bam.actor.ActorSender


  //

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

    try {
      ResultStatus status = (ResultStatus)
        conn.query(WATCHDOG_ADDRESS, 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));
    }

    ActorSender conn = null;

    try {
      conn = getConnection();

      ResultStatus status = (ResultStatus)
        conn.query(WATCHDOG_ADDRESS, 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()
  {
    ActorSender conn = getConnection();

    try {
      ResultStatus status = (ResultStatus)
        conn.query(WATCHDOG_ADDRESS, 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
  {
    ActorSender conn = getConnection();

    try {
      ResultStatus status = (ResultStatus)
        conn.query(WATCHDOG_ADDRESS, 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
  {
    ActorSender conn = getConnection();

    try {
      ResultStatus status = (ResultStatus)
        conn.query(WATCHDOG_ADDRESS, 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

    return null;
  }

  private static ActorSender getActorClient(Env env)
  {
    ActorSender connection
      = (ActorSender) 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.getBroker();

    ActorSender connection = getActorClient(env);

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

    BamPhpActor actor = getActor(env);

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

    ActorSender connection = getActorClient(env);

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

      Constructor<?> ctor = hmuxClientClass.getConstructor(String.class,
                                                           int.class,
                                                           String.class,
                                                           String.class);
     
      ActorSender sender
        = (ActorSender) ctor.newInstance(_address, _port,
                                         _userName, _password);
     
      return sender;
    } catch (InvocationTargetException e) {
View Full Code Here

TOP

Related Classes of com.caucho.bam.actor.ActorSender

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.