Package com.caucho.server.cluster

Examples of com.caucho.server.cluster.Server


    }

    if (annotated.isAnnotationPresent(AdminService.class)) {
      AdminService service = annotated.getAnnotation(AdminService.class);

      Server server = Server.getCurrent();

      if (server == null) {
        throw new ConfigException(L
            .l("@AdminService requires an active Resin Server."));
      }

      if (!server.isWatchdog()) {
        HempBroker broker = (HempBroker) server.getAdminBroker();

        broker.addStartupActor(event.getBean(), service.name(),
                               service.threadMax());
      }
    }
View Full Code Here


      getClientCertificate();

    _hasRequest = true;
    // setStartDate();

    Server server = getServer();

    if (server == null || server.isDestroyed()) {
      log.fine(dbgId() + "server is closed");

      ReadStream is = getRawRead();

      try {
View Full Code Here

    while (true) {
      _rawWrite.flush();

      code = is.read();

      Server server = getServer();
      if (server == null || server.isDestroyed()) {
        log.fine(dbgId() + " request after server close");
        killKeepalive("after server close");
        return false;
      }
View Full Code Here

                                    address));

    String host = address.substring(0, p);
    int port = Integer.parseInt(address.substring(p + 1));

    Server server = Server.getCurrent();

    boolean isSecure = false;

    return new ClientSocketFactory(server.getServerId(),
                                   address,
                                   getMeterCategory(),
                                   address,
                                   host,
                                   port,
View Full Code Here

                                    address));

    String host = address.substring(0, p);
    int port = Integer.parseInt(address.substring(p + 1));

    Server server = Server.getCurrent();

    boolean isSecure = false;

    return new ClientSocketFactory(server.getServerId(),
                          address,
                          getProbeCategory(),
                          address,
                          host, port, isSecure);
  }
View Full Code Here

    }

    if (brokerRef != null)
      return brokerRef.get();

    Server server = Server.getCurrent();

    if (server == null || ! server.isActive())
      return null;
   
    Host host = server.getHost(name, 5222);

    if (host == null)
      return null;

    // jms/3f00 vs server/2e06
View Full Code Here

  {
    _dbPool = dbPool;
    _drivers = drivers;
    _backupDrivers = backupDrivers;

    Server server = Server.getCurrent();
    if (server != null) {
      ClusterServer selfServer = server.getSelfServer();

      if (selfServer != null && _drivers.length > 1)
        _roundRobin = selfServer.getIndex() % _drivers.length;
    }
  }
View Full Code Here

  public boolean handleRequest()
    throws IOException
  {
    boolean isInvocation = false;

    Server server = getServer();
    Thread thread = Thread.currentThread();
    ClassLoader oldLoader = thread.getContextClassLoader();
    long startTime = 0;
   
    long startReadBytes = getRawRead().getPosition();
    long startWriteBytes = getRawWrite().getPosition();

    try {
      thread.setContextClassLoader(server.getClassLoader());
     
      startRequest(server.allocateHttpBuffer());

      if (! parseRequest()) {
        if (log.isLoggable(Level.FINER)) {
          log.finer(dbgId() + " empty request");
        }
View Full Code Here

 
  private String _url;
 
  public DeployClient()
  {
    Server server = Server.getCurrent();

    if (server == null)
      throw new IllegalStateException(L.l("DeployClient was not called in a Resin context. For external clients, use the DeployClient constructor with host,port arguments."));
   
    _bamClient = server.createAdminClient(getClass().getSimpleName());

    _deployAddress = "deploy@resin.caucho";
  }
View Full Code Here

    _deployAddress = "deploy@resin.caucho";
  }

  public DeployClient(String serverId)
  {
    Server server = Server.getCurrent();

    if (server == null)
      throw new IllegalStateException(L.l("DeployClient was not called in a Resin context. For external clients, use the DeployClient constructor with host,port arguments."));
   
    _bamClient = server.createAdminClient(getClass().getSimpleName());

    _deployAddress = "deploy@" + serverId + ".resin.caucho";
  }
View Full Code Here

TOP

Related Classes of com.caucho.server.cluster.Server

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.