Package org.hampelratte.svdrp

Examples of org.hampelratte.svdrp.Connection


   *            The SVDRP command to send
   * @return The SVDRP response or null, if the Command couldn't be sent
   */
  public Response send(final Command cmd) {
    Response res = null;
    Connection connection=null;
    try {
      logger.trace("New connection");
      connection = new Connection(mIp, mPort, timeout, charset);
      logger.debug("Try to send VDR command: {}", cmd.getCommand());

      res = connection.send(cmd);
      logger.debug("Recived Message from VDR: {}", res.getMessage());
    } catch (Exception e) {
      logger.error("Could not connect to VDR on {}: {}", mIp + ":" + mPort,
          e);
    } finally {
      if (connection != null) {
        try {
          connection.close();
        } catch (IOException e) {
          logger.error("Could not close connection to VDR on {}: {}", mIp + ":" + mPort,
              e);
        }     
      }
View Full Code Here

TOP

Related Classes of org.hampelratte.svdrp.Connection

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.