-/*******************************************************************************\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.InetAddress;\r
-import java.net.InetSocketAddress;\r
-import java.net.Socket;\r
-\r
-import org.simantics.databoard.Methods;\r
-import org.simantics.databoard.binding.error.BindingException;\r
-import org.simantics.databoard.method.TcpConnection.ConnectionListener;\r
-import org.simantics.databoard.serialization.SerializationException;\r
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.Socket;
+
+import org.simantics.databoard.Methods;
+import org.simantics.databoard.binding.error.BindingException;
+import org.simantics.databoard.method.TcpConnection.ConnectionListener;
+import org.simantics.databoard.serialization.SerializationException;
/**
* Proxy InterfaceBinding over a socket.
TcpConnection c;
/**
- * Create a new method interface client. On successful construction the \r
+ * Create a new method interface client. On successful construction the
* connection is established over TCP/IP channel.
*
* @param addr
throws IOException, SerializationException, BindingException {
this(InetAddress.getByName(addr), port);
}
-\r
- /**\r
- * Create a new method interface client. On successful construction the \r
- * connection is established over TCP/IP channel.\r
- * \r
- * @param sa\r
- * @throws IOException connection error\r
- * @throws SerializationException handshake communication error\r
- * @throws BindingException handshake communication error\r
- */\r
- public Client(InetSocketAddress sa) \r
- throws IOException, SerializationException, BindingException {\r
- s = new Socket(sa.getAddress(), sa.getPort());\r
- Handshake local = new Handshake();\r
- local.methods = Methods.noMethods().getInterface().getMethodDefinitions();\r
- Handshake remote = TcpConnection.handshake(s, local);\r
- c = new TcpConnection(s, Methods.noMethods(), local, remote); \r
- }\r
/**
- * Create a new method interface client. On successful construction the \r
- * connection is established over TCP/IP channel.\r
+ * Create a new method interface client. On successful construction the
+ * connection is established over TCP/IP channel.
+ *
+ * @param sa
+ * @throws IOException connection error
+ * @throws SerializationException handshake communication error
+ * @throws BindingException handshake communication error
+ */
+ public Client(InetSocketAddress sa)
+ throws IOException, SerializationException, BindingException {
+ s = new Socket(sa.getAddress(), sa.getPort());
+ Handshake local = new Handshake();
+ local.methods = Methods.noMethods().getInterface().getMethodDefinitions();
+ Handshake remote = TcpConnection.handshake(s, local);
+ c = new TcpConnection(s, Methods.noMethods(), local, remote);
+ }
+
+ /**
+ * Create a new method interface client. On successful construction the
+ * connection is established over TCP/IP channel.
*
* @param addr
* @param port
}
/**
- * Create a new method interface client. On successful construction the \r
- * connection is established over TCP/IP channel.\r
+ * Create a new method interface client. On successful construction the
+ * connection is established over TCP/IP channel.
*
* @param addr
* @param port
public Method getMethod(MethodTypeDefinition description)
throws MethodNotSupportedException {
return c.getMethod(description);
- }\r
+ }
public TcpConnection getConnection()
{