Examples of RemoteNodeConfiguration


Examples of org.serviceconnector.conf.RemoteNodeConfiguration

      this.listening = false;
      LOGGER.error("unable to start listener=" + listenerConfig.getName(), ex);
      throw new SCServiceException("Unable to start listener.", ex);
    }
    this.listening = true;
    RemoteNodeConfiguration remoteNodeConf = new RemoteNodeConfiguration(this.listenerPort + "server", this.scHost,
        this.scPort, this.connectionType.getValue(), this.keepAliveIntervalSeconds, this.checkRegistrationIntervalSeconds,
        1);
    // initialize requester, maxConnection = 1 only 1 connection allowed for register server
    this.requester = new SCRequester(remoteNodeConf, this.keepAliveTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
  }
 
View Full Code Here

Examples of org.serviceconnector.conf.RemoteNodeConfiguration

    }
    ValidatorUtility.validateInt(Constants.MIN_PORT_VALUE, this.port, Constants.MAX_PORT_VALUE, SCMPError.HV_WRONG_PORTNR);
    // 2. initialize call & invoke
    synchronized (AppContext.communicatorsLock) {
      AppContext.init();
      RemoteNodeConfiguration remoteNodeConf = new RemoteNodeConfiguration(this.port + "client", this.host, this.port,
          this.connectionType.getValue(), this.keepAliveIntervalSeconds, 0, this.maxConnections);
      this.requester = new SCRequester(remoteNodeConf, this.keepAliveTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      SCServiceCallback callback = new SCServiceCallback(true);
      SCMPAttachCall attachCall = new SCMPAttachCall(this.requester);
      try {
View Full Code Here

Examples of org.serviceconnector.conf.RemoteNodeConfiguration

    ResponderRegistry responderRegistry = AppContext.getResponderRegistry();
    IResponder responder = responderRegistry.getCurrentResponder();
    ListenerConfiguration listenerConfig = responder.getListenerConfig();
    String connectionType = listenerConfig.getConnectionType();

    RemoteNodeConfiguration remoteNodeConfiguration = new RemoteNodeConfiguration(ServerType.STATEFUL_SERVER, serverKey,
        socketAddress.getHostName(), portNr, connectionType, keepAliveIntervalSeconds, checkRegistrationIntervalSeconds,
        maxConnections, maxSessions, httpUrlFileQualifier);
    // create new server
    StatefulServer server = new StatefulServer(remoteNodeConfiguration, serviceName, socketAddress);
    try {
View Full Code Here

Examples of org.serviceconnector.conf.RemoteNodeConfiguration

    }
    ValidatorUtility.validateInt(Constants.MIN_PORT_VALUE, this.port, Constants.MAX_PORT_VALUE, SCMPError.HV_WRONG_PORTNR);
    // 2. initialize call & invoke
    synchronized (AppContext.communicatorsLock) {
      AppContext.init();
      RemoteNodeConfiguration remoteNodeConf = new RemoteNodeConfiguration(this.port + "client", this.host, this.port,
          this.connectionType.getValue(), this.keepAliveIntervalSeconds, 0, this.maxConnections);
      this.requester = new SCRequester(remoteNodeConf, this.keepAliveTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      SCServiceCallback callback = new SCServiceCallback(true);
      SCMPAttachCall attachCall = new SCMPAttachCall(this.requester);
      try {
View Full Code Here

Examples of org.serviceconnector.conf.RemoteNodeConfiguration

            this.writeBean(writer, listenerConfig);
            writer.writeEndElement();
            continue;
          }
          if (value instanceof RemoteNodeConfiguration) {
            RemoteNodeConfiguration remoteNodeConfiguration = (RemoteNodeConfiguration) value;
            writer.writeStartElement(name);
            this.writeBean(writer, remoteNodeConfiguration);
            writer.writeEndElement();
            continue;
          }
View Full Code Here

Examples of org.serviceconnector.conf.RemoteNodeConfiguration

        .validateInt(Constants.MIN_PORT_VALUE, this.tomcatPort, Constants.MAX_PORT_VALUE, SCMPError.HV_WRONG_PORTNR);
    if (scPort == this.tomcatPort) {
      throw new SCMPValidatorException("SC port and tomcat port must not be the same.");
    }
    // init the requester to communicate to SC
    RemoteNodeConfiguration remoteNodeConf = new RemoteNodeConfiguration(remotNodeName, scHost, scPort,
        ConnectionType.NETTY_HTTP.getValue(), keepAliveIntervalToSCSeconds, checkRegistrationIntervalSeconds, 1);
    this.requester = new SCRequester(remoteNodeConf, keepAliveOTISeconds * Constants.SEC_TO_MILLISEC_FACTOR);
  }
 
View Full Code Here

Examples of org.serviceconnector.conf.RemoteNodeConfiguration

    ServiceRegistry serviceRegistry = AppContext.getServiceRegistry();

    for (ServiceConfiguration serviceConfiguration : serviceConfigurationMap.values()) {
      String serviceTypeString = serviceConfiguration.getType();
      ServiceType serviceType = ServiceType.getType(serviceTypeString);
      RemoteNodeConfiguration remoteNode = serviceConfiguration.getRemoteNodeConfiguration();
      String remotNodeName = null;
      if (remoteNode != null) {
        remotNodeName = remoteNode.getName();
        serviceType = ServiceConfiguration.adaptServiceTypeIfCascService(serviceType, remotNodeName);
      }
      String serviceName = serviceConfiguration.getName();

      // instantiate right type of service
View Full Code Here

Examples of org.serviceconnector.conf.RemoteNodeConfiguration

      this.listening = false;
      LOGGER.error("unable to start listener=" + listenerConfig.getName(), ex);
      throw new SCServiceException("Unable to start listener.", ex);
    }
    this.listening = true;
    RemoteNodeConfiguration remoteNodeConf = new RemoteNodeConfiguration(this.listenerPort + "server", this.scHost,
        this.scPort, this.connectionType.getValue(), this.keepAliveIntervalSeconds, this.checkRegistrationIntervalSeconds,
        1);
    // initialize requester, maxConnection = 1 only 1 connection allowed for register server
    this.requester = new SCRequester(remoteNodeConf, this.keepAliveTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
  }
 
View Full Code Here

Examples of org.serviceconnector.conf.RemoteNodeConfiguration

    this.maxSessions = remoteNodeConfiguration.getMaxSessions();
    this.serverKey = serviceName + "_" + socketAddress.getHostName() + Constants.SLASH + socketAddress.getPort();
    this.serviceName = serviceName;
    this.service = null;
    // set up separate remote node configuration for SRV_ABORT_SESSION request in case of busy connection pool
    this.sasRemoteNodeConfiguration = new RemoteNodeConfiguration(ServerType.UNDEFINED, remoteNodeConfiguration.getName(),
        remoteNodeConfiguration.getHost(), remoteNodeConfiguration.getPort(), remoteNodeConfiguration.getConnectionType(),
        0, 0, 1, 1, remoteNodeConfiguration.getHttpUrlFileQualifier());
    // calculate server timeout: multiply check registration interval with checkRegistrationIntervalMultiplier!
    this.serverTimeoutMillis = (remoteNodeConfiguration.getCheckRegistrationIntervalSeconds()
        * Constants.SEC_TO_MILLISEC_FACTOR * AppContext.getBasicConfiguration().getCheckRegistrationIntervalMultiplier());
 
View Full Code Here

Examples of org.serviceconnector.conf.RemoteNodeConfiguration

  @Before
  public void beforeOneTest() throws Exception {
    super.beforeOneTest();
    if (cascadingLevel == 1) {
      this.requester = new SCRequester(new RemoteNodeConfiguration(TestConstants.RemoteNodeName, TestConstants.HOST,
          TestConstants.PORT_SC1_HTTP, ConnectionType.NETTY_HTTP.getValue(), 0, 0, 10), 0);
      AppContext.init();
      this.createSession();
    }
  }
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.