Package org.serviceconnector.net.req

Examples of org.serviceconnector.net.req.Requester


   *            the remote node configuration
   * @param socketAddress
   *            the socket address
   */
  public Server(RemoteNodeConfiguration remoteNodeConfiguration, InetSocketAddress socketAddress) {
    this.requester = new Requester(remoteNodeConfiguration);
    this.remoteNodeConfiguration = remoteNodeConfiguration;
    this.serverKey = "_" + socketAddress.getHostName() + Constants.SLASH + socketAddress.getPort();
    this.socketAddress = socketAddress;
    this.destroyed = false;
    // timeout observation not necessary for server except stateful servers!
View Full Code Here


      LOGGER.warn("ConnectionPoolBusyException in aborting session wait mec " + scmpCommandException.toString());
      // ConnectionPoolBusyException after wait mec - try opening a new connection

      // RemoteNodeConfiguration remoteNodeConfiguration = this.requester.getRemoteNodeConfiguration();
      // set up a new requester to make the SAS - only 1 connection is allowed
      Requester sasRequester = new Requester(this.sasRemoteNodeConfiguration);
      try {
        this.serverAbortSessionWithExtraRequester(sasRequester, abortMessage, callback, oti);
      } catch (ConnectionPoolBusyException e) {
        sasRequester.destroy();
        LOGGER.warn("ConnectionPoolBusyException in aborting session wait mec over special connection. " + e.toString());
        if (this.service.getType() == ServiceType.SESSION_SERVICE) {
          this.abortSessionsAndDestroy("Session abort over a new connection failed");
        }
        return;
      }
      sasRequester.destroy();
      // validate reply of server
      SCMPMessage reply = callback.getMessageSync(oti);
      if (reply.isFault()) {
        LOGGER.warn("Fault in aborting session wait mec over special connection");
        // error in server abort session - destroy server
View Full Code Here

    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));

          SCMPDetachCall detachCall = new SCMPDetachCall(req);
          detachCall.invoke(cbk, 1000);
          TestUtil.checkReply(cbk.getMessageSync(1000));
          req.destroy();
        } catch (Exception e) {
          Assert.fail("Connection to NIC : " + inetAddress.getHostAddress() + " failed!");
        }
      }
    }
View Full Code Here

      LOGGER.warn("ConnectionPoolBusyException in aborting session wait mec " + scmpCommandException.toString());
      // ConnectionPoolBusyException after wait mec - try opening a new connection

      // RemoteNodeConfiguration remoteNodeConfiguration = this.requester.getRemoteNodeConfiguration();
      // set up a new requester to make the SAS - only 1 connection is allowed
      Requester sasRequester = new Requester(this.sasRemoteNodeConfiguration);
      try {
        this.serverAbortSessionWithExtraRequester(sasRequester, abortMessage, callback, oti);
      } catch (ConnectionPoolBusyException e) {
        sasRequester.destroy();
        LOGGER.warn("ConnectionPoolBusyException in aborting session wait mec over special connection. " + e.toString());
        if (this.service.getType() == ServiceType.SESSION_SERVICE) {
          this.abortSessionsAndDestroy("Session abort over a new connection failed");
        }
        return;
      }
      sasRequester.destroy();
      // validate reply of server
      SCMPMessage reply = callback.getMessageSync(oti);
      if (reply.isFault()) {
        LOGGER.warn("Fault in aborting session wait mec over special connection");
        // error in server abort session - destroy server
View Full Code Here

TOP

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

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.