X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fsrc%2Forg%2Fsimantics%2Fdataboard%2Fmethod%2FServer.java;h=a14b778cd8ec9c9961d294d50780edb934c078b2;hb=refs%2Fchanges%2F38%2F238%2F2;hp=53dbc923ef8b84053eb288b409d5d2434c7fbb0b;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.databoard/src/org/simantics/databoard/method/Server.java b/bundles/org.simantics.databoard/src/org/simantics/databoard/method/Server.java index 53dbc923e..a14b778cd 100644 --- a/bundles/org.simantics.databoard/src/org/simantics/databoard/method/Server.java +++ b/bundles/org.simantics.databoard/src/org/simantics/databoard/method/Server.java @@ -1,25 +1,25 @@ -/******************************************************************************* - * 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 - *******************************************************************************/ +/******************************************************************************* + * 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; -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; +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. @@ -80,7 +80,7 @@ public class Server { } }); - connections.add( c ); + connections.add( c ); if (c.getSocket().isClosed()) connections.remove(c); } catch (IOException e) { LOGGER.log(Level.FINER, "Connection Closed"); @@ -91,7 +91,7 @@ public class Server { } } } - }; + }; acceptThread.setDaemon(true); acceptThread.start(); } @@ -111,13 +111,13 @@ public class Server { } catch (IOException e) { } } - } - - /** - * @return The port the server is listening. - */ - public int getPort() { - return socket.getLocalPort(); + } + + /** + * @return The port the server is listening. + */ + public int getPort() { + return socket.getLocalPort(); } }