Package org.serviceconnector.net.req

Examples of org.serviceconnector.net.req.SCRequester


    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


    // 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 {
        attachCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      } catch (Exception e) {
View Full Code Here

    // 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 {
        attachCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      } catch (Exception e) {
View Full Code Here

      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

    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

  @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

  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

  }

  @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

      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

    // 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 {
        attachCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.serviceconnector.net.req.SCRequester

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.