001/** 002 * Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/ 003 * 004 * This file is part of Dicoogle/dicoogle. 005 * 006 * Dicoogle/dicoogle is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU General Public License as published by 008 * the Free Software Foundation, either version 3 of the License, or 009 * (at your option) any later version. 010 * 011 * Dicoogle/dicoogle is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014 * GNU General Public License for more details. 015 * 016 * You should have received a copy of the GNU General Public License 017 * along with Dicoogle. If not, see <http://www.gnu.org/licenses/>. 018 */ 019/* 020 * Thread for DICOM Echo Reply service implementation 021 */ 022 023package pt.ua.dicoogle.server.queryretrieve; 024 025 026/** 027 * 028 * @author Joaoffr <joaoffr@ua.pt> 029 * @author DavidP <davidp@ua.pt> 030 * 031 * @version $Revision: 002 $ $Date: 2008-11-22 14:25:00 $ 032 * @since Nov 21, 2008 033 * 034 */ 035public class EchoReplyService extends Thread 036{ 037 038 private DicomEchoReply echoReply = null; 039 040 041 public EchoReplyService() { 042 this.echoReply = new DicomEchoReply(); 043 } 044 045 046 047 public DicomEchoReply getEchoReply() { 048 return echoReply; 049 } 050 051 052 053 @Override 054 public void run() { 055 /* 056 * //// 057 try { 058 this.mw.add2ServerLogln("Starting Verification Service...", MainWindow.LOG_MODES.WARNING); 059 060 if (this.echoReply.startListening()) { 061 this.mw.add2ServerLogln("Verification Service start listening on port "+ this.echoReply.getLocalPort() + ".", 062 MainWindow.LOG_MODES.NORMAL); 063 064 this.mw.add2ServerLogln("Verification Service started!",MainWindow.LOG_MODES.WARNING); 065 } else { 066 this.mw.add2ServerLogln("Error Starting Verification Service on port " + this.echoReply.getLocalPort() + "...", 067 MainWindow.LOG_MODES.ERROR); 068 } 069 } 070 catch (Exception ex) { 071 this.mw.add2ServerLogln(ex.getMessage(), MainWindow.LOG_MODES.ERROR); 072 } 073 074 */ 075 } 076 077 public void stopService() { 078 /* /// 079 try { 080 this.mw.add2ServerLogln("Stopping Verification Service...", MainWindow.LOG_MODES.WARNING); 081 082 if (this.echoReply.stopListening()) { 083 super.stop(); 084 085 this.mw.add2ServerLogln("Verification Service stoped.", MainWindow.LOG_MODES.WARNING); 086 } else { 087 this.mw.add2ServerLogln("Error stopping Verification Service on port " + this.echoReply.getLocalPort() + " ...", 088 MainWindow.LOG_MODES.ERROR); 089 } 090 } 091 catch (Exception ex) { 092 this.mw.add2ServerLogln(ex.getMessage(), MainWindow.LOG_MODES.ERROR); 093 } 094 */ 095 096 } 097 098 099}