-/*******************************************************************************\r
- * Copyright (c) 2010 Association for Decentralized Information Management in\r
- * Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- * VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
+/*******************************************************************************
+ * Copyright (c) 2010 Association for Decentralized Information Management in
+ * Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
package org.simantics.databoard.method;
-import java.io.IOException;\r
-import java.net.ServerSocket;\r
-import java.net.Socket;\r
-import java.util.List;\r
-import java.util.concurrent.CopyOnWriteArrayList;\r
-import java.util.logging.Level;\r
-import java.util.logging.Logger;\r
-\r
-import org.simantics.databoard.method.TcpConnection.ConnectionListener;\r
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.simantics.databoard.method.TcpConnection.ConnectionListener;
/**
* Server opens a server socket and accepts incoming connections.
}
});
- connections.add( c ); \r
+ connections.add( c );
if (c.getSocket().isClosed()) connections.remove(c);
} catch (IOException e) {
LOGGER.log(Level.FINER, "Connection Closed");
}
}
}
- };\r
+ };
acceptThread.setDaemon(true);
acceptThread.start();
}
} catch (IOException e) {
}
}
- }\r
- \r
- /** \r
- * @return The port the server is listening.\r
- */\r
- public int getPort() {\r
- return socket.getLocalPort(); \r
+ }
+
+ /**
+ * @return The port the server is listening.
+ */
+ public int getPort() {
+ return socket.getLocalPort();
}
}