Package org.serviceconnector.net

Examples of org.serviceconnector.net.SCMPCommunicationException


    future.addListener(this.operationListener);
    try {
      this.operationListener.awaitUninterruptibly(baseConf.getConnectionTimeoutMillis());
    } catch (CommunicationException ex) {
      LOGGER.error("disconnect", ex);
      throw new SCMPCommunicationException(SCMPError.CONNECTION_EXCEPTION, "disconnect from IP="
          + this.remotSocketAddress.toString());
    }
    if (ConnectionLogger.isEnabled()) {
      ConnectionLogger.logDisconnectByLocalHost(this.getClass().getSimpleName(), this.remotSocketAddress.getHostName(),
          this.remotSocketAddress.getPort());
View Full Code Here


      this.channel = this.operationListener.awaitUninterruptibly(baseConf.getConnectionTimeoutMillis()).getChannel();
      // complete localSocketAdress
      this.remotSocketAddress = (InetSocketAddress) this.channel.getRemoteAddress();
    } catch (CommunicationException ex) {
      LOGGER.error("connect", ex);
      throw new SCMPCommunicationException(SCMPError.CONNECTION_EXCEPTION, "connect to IP="
          + this.remotSocketAddress.toString());
    }
    if (ConnectionLogger.isEnabled()) {
      ConnectionLogger.logConnect(this.getClass().getSimpleName(), this.remotSocketAddress.getHostName(),
          this.remotSocketAddress.getPort());
View Full Code Here

    this.serverThread.start();
    Boolean bool = null;
    try {
      bool = this.answer.poll(baseConf.getConnectionTimeoutMillis(), TimeUnit.MILLISECONDS);
    } catch (InterruptedException e) {
      throw new SCMPCommunicationException(SCMPError.CONNECTION_EXCEPTION, "cannot start listener on port=" + this.port);
    }
    if (bool == null) {
      throw new SCMPCommunicationException(SCMPError.CONNECTION_EXCEPTION, "startup listener timed out on port=" + this.port);
    }
    if (bool == false) {
      throw new SCMPCommunicationException(SCMPError.CONNECTION_EXCEPTION, "cannot start listener on port=" + this.port);
    }
  }
View Full Code Here

    this.serverThread.start();
    Boolean bool = null;
    try {
      bool = this.answer.poll(baseConf.getConnectionTimeoutMillis(), TimeUnit.MILLISECONDS);
    } catch (InterruptedException e) {
      throw new SCMPCommunicationException(SCMPError.CONNECTION_EXCEPTION, "cannot start listener on port=" + this.port);
    }
    if (bool == null) {
      throw new SCMPCommunicationException(SCMPError.CONNECTION_EXCEPTION, "startup listener timed out on port=" + this.port);
    }
    if (bool == false) {
      throw new SCMPCommunicationException(SCMPError.CONNECTION_EXCEPTION, "cannot start listener on port=" + this.port);
    }
  }
View Full Code Here

        // server connections get connected immediately
        server.immediateConnect();
      }
    } catch (Exception ex) {
      LOGGER.error("immediate connect", ex);
      HasFaultResponseException communicationException = new SCMPCommunicationException(SCMPError.CONNECTION_EXCEPTION,
          "immediate connect to server=" + serverKey);
      communicationException.setMessageType(getKey());
      throw communicationException;
    }
    // add server to service
    service.addServer(server);
    // add service to server
View Full Code Here

      this.channel = operationListener.awaitUninterruptibly(baseConf.getConnectionTimeoutMillis()).getChannel();
      // complete remotSocketAddress
      this.remotSocketAddress = (InetSocketAddress) this.channel.getRemoteAddress();
    } catch (CommunicationException ex) {
      LOGGER.error("connect failed to " + this.remotSocketAddress.toString(), ex);
      throw new SCMPCommunicationException(SCMPError.CONNECTION_EXCEPTION, "connect to IP="
          + this.remotSocketAddress.toString());
    }
    if (ConnectionLogger.isEnabled()) {
      ConnectionLogger.logConnect(this.getClass().getSimpleName(), this.remotSocketAddress.getHostName(),
          this.remotSocketAddress.getPort());
View Full Code Here

        // server connections get connected immediately
        server.immediateConnect();
      }
    } catch (Exception ex) {
      LOGGER.error("immediate connect", ex);
      HasFaultResponseException communicationException = new SCMPCommunicationException(SCMPError.CONNECTION_EXCEPTION,
          "immediate connect to server=" + serverKey);
      communicationException.setMessageType(getKey());
      throw communicationException;
    }
    // add server to service
    service.addServer(server);
    // add service to server
View Full Code Here

      this.channel = operationListener.awaitUninterruptibly(baseConf.getConnectionTimeoutMillis()).getChannel();
      // complete remotSocketAddress
      this.remotSocketAddress = (InetSocketAddress) this.channel.getRemoteAddress();
    } catch (CommunicationException ex) {
      LOGGER.error("connect failed to " + this.remotSocketAddress.toString(), ex);
      throw new SCMPCommunicationException(SCMPError.CONNECTION_EXCEPTION, "connect to IP="
          + this.remotSocketAddress.toString());
    }
    if (ConnectionLogger.isEnabled()) {
      ConnectionLogger.logConnect(this.getClass().getSimpleName(), this.remotSocketAddress.getHostName(),
          this.remotSocketAddress.getPort());
View Full Code Here

      this.channel = this.operationListener.awaitUninterruptibly(baseConf.getConnectionTimeoutMillis()).getChannel();
      // complete localSocketAdress
      this.remotSocketAddress = (InetSocketAddress) this.channel.getRemoteAddress();
    } catch (CommunicationException ex) {
      LOGGER.error("connect", ex);
      throw new SCMPCommunicationException(SCMPError.CONNECTION_EXCEPTION, "connect to IP="
          + this.remotSocketAddress.toString());
    }
    if (ConnectionLogger.isEnabled()) {
      ConnectionLogger.logConnect(this.getClass().getSimpleName(), this.remotSocketAddress.getHostName(),
          this.remotSocketAddress.getPort());
View Full Code Here

TOP

Related Classes of org.serviceconnector.net.SCMPCommunicationException

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.