Examples of RemoteNodeConfiguration


Examples of org.serviceconnector.conf.RemoteNodeConfiguration

  public void beforeOneTest() throws Exception {
    super.beforeOneTest();
    if (this.requester != null) {
      this.requester.destroy();
    }
    this.requester = new SCRequester(new RemoteNodeConfiguration(TestConstants.RemoteNodeName, TestConstants.HOST,
        TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP.getValue(), 0, 0, 10), 0);
    AppContext.init();
  }
View Full Code Here

Examples of org.serviceconnector.conf.RemoteNodeConfiguration

    for (NetworkInterface netint : Collections.list(nets)) {
      Enumeration<InetAddress> inetAdresses = netint.getInetAddresses();
      for (InetAddress inetAddress : Collections.list(inetAdresses)) {
        try {
          IRequester req = new Requester(new RemoteNodeConfiguration(TestConstants.RemoteNodeName, TestConstants.HOST,
              TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP.getValue(), 0, 0, 1));
          SCMPAttachCall attachCall = new SCMPAttachCall(req);
          attachCall.invoke(cbk, 1000);
          TestUtil.checkReply(cbk.getMessageSync(1000));
View Full Code Here

Examples of org.serviceconnector.conf.RemoteNodeConfiguration

  }

  @Before
  public void beforeOneTest() throws Exception {
    super.beforeOneTest();
    this.requester = new SCRequester(new RemoteNodeConfiguration(TestConstants.RemoteNodeName, TestConstants.HOST,
        TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP.getValue(), 0, 0, 3), 0);
    AppContext.init();
  }
View Full Code Here

Examples of org.serviceconnector.conf.RemoteNodeConfiguration

  /** {@inheritDoc} */
  @Override
  public void setResponder(IResponder resp) {
    super.setResponder(resp);
    ListenerConfiguration listenerConfig = resp.getListenerConfig();
    RemoteNodeConfiguration remoteNodeConfig = listenerConfig.getRemoteNodeConfiguration();
    if (remoteNodeConfig == null) {
      throw new InvalidConfigurationException("remote host configuration is missing for responder="
          + resp.getListenerConfig().getName());
    }
    this.remoteHost = remoteNodeConfig.getHost();
    this.remotePort = remoteNodeConfig.getPort();
    try {
      // limit threads to maxIOThreads
      this.endpointChannelFactory = new NioServerSocketChannelFactory(Executors.newCachedThreadPool(),
          Executors.newCachedThreadPool(), AppContext.getBasicConfiguration().getMaxIOThreads());
      this.clientChannelFactory = new NioClientSocketChannelFactory(Executors.newCachedThreadPool(),
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

            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

    }
    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

  @Before
  public void beforeOneTest() throws Exception {
    super.beforeOneTest();
    AppContext.init();
    this.requester = new SCRequester(new RemoteNodeConfiguration(TestConstants.RemoteNodeName, TestConstants.HOST,
        TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP.getValue(), 0, 0, 1), 0);
  }
View Full Code Here

Examples of org.serviceconnector.conf.RemoteNodeConfiguration

  }

  @Before
  public void beforeOneTest() throws Exception {
    super.beforeOneTest();
    this.requester = new SCRequester(new RemoteNodeConfiguration(TestConstants.RemoteNodeName, TestConstants.HOST,
        TestConstants.PORT_SC0_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.