Example #1
0
  /** This function is internal and should not be called by users of this class. */
  @Override
  public void connectionIndication(TConnection tConnection) {

    try {

      AcseAssociation acseAssociation = new AcseAssociation(tConnection, pSelLocal);

      ByteBuffer asdu = ByteBuffer.allocate(1000);
      try {
        acseAssociation.listenForCn(asdu);
      } catch (IOException e) {
        logger.warn("Server: Connection unsuccessful. IOException:" + e.getMessage());
        tConnection.close();
        return;
      } catch (TimeoutException e) {
        logger.error("Illegal state: Timeout should not occur here");
        tConnection.close();
        return;
      }

      associationListener.connectionIndication(acseAssociation, asdu);

    } catch (Exception e) {
      logger.warn("Association closed because of an unexpected exception.", e);
      tConnection.close();
    }
  }
Example #2
0
 /** This function is internal and should not be called by users of this class. */
 @Override
 public void serverStoppedListeningIndication(IOException e) {
   associationListener.serverStoppedListeningIndication(e);
 }