Package org.serviceconnector.registry

Examples of org.serviceconnector.registry.ServerRegistry


  /** {@inheritDoc} */
  @Override
  public final void loadBody(XMLStreamWriter writer, IWebRequest request) throws Exception {
    String serverParameter = request.getParameter("server");
    if (serverParameter != null) {
      ServerRegistry serverRegistry = AppContext.getServerRegistry();
      Server server = serverRegistry.getServer(serverParameter);
      if (server != null) {
        writer.writeStartElement("server");
        this.writeBean(writer, server);
        writer.writeEndElement();
      }
View Full Code Here


  /** {@inheritDoc} */
  @Override
  public final void loadBody(XMLStreamWriter writer, IWebRequest request) throws Exception {
    String serverParameter = request.getParameter("server");
    if (serverParameter != null) {
      ServerRegistry serverRegistry = AppContext.getServerRegistry();
      Server server = serverRegistry.getServer(serverParameter);
      if (server != null) {
        writer.writeStartElement("server");
        this.writeBean(writer, server);
        writer.writeEndElement();
      }
View Full Code Here

   *            the new sC environment
   */
  public static void setSCEnvironment(boolean scEnvironment) {
    AppContext.scEnvironment = scEnvironment;
    if (AppContext.scEnvironment) {
      AppContext.serverRegistry = new ServerRegistry();
      AppContext.serviceRegistry = new ServiceRegistry();
      AppContext.sessionRegistry = new SessionRegistry();
      AppContext.subscriptionRegistry = new SubscriptionRegistry();
      AppContext.cacheRegistry = new CacheRegistry();
    }
View Full Code Here

public class ServersXMLLoader extends AbstractXMLLoader {

  /** {@inheritDoc} */
  @Override
  public final void loadBody(XMLStreamWriter writer, IWebRequest request) throws Exception {
    ServerRegistry serverRegistry = AppContext.getServerRegistry();
    writer.writeStartElement("servers");
    Server[] servers = serverRegistry.getServers();
    int simulation = this.getParameterInt(request, "sim", 0);
    if (simulation > 0 && servers.length > 0) {
      Server[] sim = new Server[simulation + servers.length];
      System.arraycopy(servers, 0, sim, 0, servers.length);
      for (int i = servers.length; i < simulation + servers.length; i++) {
View Full Code Here

   *            the new sC environment
   */
  public static void setSCEnvironment(boolean scEnvironment) {
    AppContext.scEnvironment = scEnvironment;
    if (AppContext.scEnvironment) {
      AppContext.serverRegistry = new ServerRegistry();
      AppContext.serviceRegistry = new ServiceRegistry();
      AppContext.sessionRegistry = new SessionRegistry();
      AppContext.subscriptionRegistry = new SubscriptionRegistry();
      AppContext.cacheModuleRegistry = new CacheModuleRegistry();
    }
View Full Code Here

  /** {@inheritDoc} */
  @Override
  public final void loadBody(XMLStreamWriter writer, IWebRequest request) throws Exception {
    String serverParameter = request.getParameter("server");
    if (serverParameter != null) {
      ServerRegistry serverRegistry = AppContext.getServerRegistry();
      Server server = serverRegistry.getServer(serverParameter);
      if (server != null) {
        writer.writeStartElement("server");
        this.writeBean(writer, server);
        writer.writeEndElement();
      }
View Full Code Here

   * @param port
   *            the port
   */
  private void cleanUpDeadServer(String host, int port) {
    String wildKey = "_" + host + Constants.SLASH + port;
    ServerRegistry serverRegistry = AppContext.getServerRegistry();
    Set<String> keySet = serverRegistry.keySet();

    for (String key : keySet) {
      try {
        if (key.endsWith(wildKey)) {
          Server server = serverRegistry.getServer(key);
          if ((server instanceof StatefulServer) == false) {
            continue;
          }
          LOGGER.debug("clean up dead server with wild key " + wildKey);
          StatefulServer statefulServer = (StatefulServer) server;
View Full Code Here

TOP

Related Classes of org.serviceconnector.registry.ServerRegistry

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.