Package org.serviceconnector.api.cln

Examples of org.serviceconnector.api.cln.SCClient.detach()


    } finally {
      try {
        SCMessage msg = new SCMessage();
        msg.setSessionInfo("kill server");
        sessionSrv.deleteSession(5, msg);
        sc.detach(2); // detaches from SC, stops communication
      } catch (Exception e) {
        LOGGER.error("cleanup", e);
      }
    }
  }
View Full Code Here


          dstStream.close();
        } catch (Exception e) {
        }
      }
      if (client != null) {
        client.detach();
      }
    }
  }

  /**
 
View Full Code Here

      e.printStackTrace();
    } finally {
      try {
        // disconnects from SC
        publishServiceA.unsubscribe();
        sc.detach();
      } catch (Exception e) {
        sc = null;
      }
    }
  }
View Full Code Here

    cbk1.waitForMessage(2);
    cbk2.waitForMessage(2);

    Assert.assertFalse("service1 is still active", service1.isActive());
    Assert.assertFalse("service2 is still active", service2.isActive());
    client2.detach();
  }
}
View Full Code Here

    cbk1.waitForMessage(2);
    cbk2.waitForMessage(2);

    Assert.assertFalse("service1 is still active", service1.isActive());
    Assert.assertFalse("service2 is still active", service2.isActive());
    client2.detach();
  }
}
View Full Code Here

    cbk1.waitForMessage(2);
    cbk2.waitForMessage(2);

    Assert.assertFalse("service1 is still active", service1.isActive());
    Assert.assertFalse("service2 is still active", service2.isActive());
    client2.detach();
  }
}
View Full Code Here

    } catch (Exception e) {
      LOGGER.error("run", e);
      throw e;
    } finally {
      try {
        sc.detach(); // detaches from SC, stops communication
      } catch (Exception e) {
        LOGGER.error("cleanup", e);
        throw e;
      }
    }
View Full Code Here

    } catch (Exception e) {
      LOGGER.error("run", e);
    } finally {
      try {
        client.detach();
      } catch (Exception e) {
        LOGGER.error("run", e);
      }
    }
  }
View Full Code Here

    } catch (Exception e) {
      LOGGER.error("run", e);
    } finally {
      try {
        sc.detach();
      } catch (Exception e) {
        LOGGER.error("run", e);
      }
    }
  }
View Full Code Here

      SCMessage scMessage = new SCMessage();
      scMessage.setSessionInfo("sessionInfo");
      service.createSession(300, scMessage, new TestSessionServiceMessageCallback(service));
      response = service.execute(new SCMessage("executed"));
      service.deleteSession();
      sc.detach();
    } catch (Exception e) {
    }

    testLogger.info("Messages executed successfuly (clients):\t" + sum);
    testLogger.info("Messages executed successfuly (server):\t" + response.getData().toString());
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.