@@ -0,0 +1,2412 @@
+/**%0A * Copyright (c) 2010-2017 by the respective copyright holders.%0A *%0A * All rights reserved. This program and the accompanying materials%0A * are made available under the terms of the Eclipse Public License v1.0%0A * which accompanies this distribution, and is available at%0A * http://www.eclipse.org/legal/epl-v10.html%0A */%0Apackage de.csdev.ebus.core.connection;%0A%0Aimport java.io.IOException;%0Aimport java.net.InetSocketAddress;%0Aimport java.nio.ByteBuffer;%0Aimport java.nio.channels.DatagramChannel;%0A%0A/**%0A * @author Christian Sowada - Initial contribution%0A *%0A */%0Apublic class EBusUDPConnection implements IEBusConnection %7B%0A%0A    private DatagramChannel channel;%0A%0A    /** The udp hostname */%0A    private String hostname;%0A%0A    /** The udp port */%0A    private int port;%0A%0A    // private SocketAddress server;%0A%0A    /**%0A     * Constructor%0A     *%0A     * @param hostname%0A     * @param port%0A     */%0A    public EBusUDPConnection(String hostname, int port) %7B%0A        this.hostname = hostname;%0A        this.port = port;%0A    %7D%0A%0A    /*%0A     * (non-Javadoc)%0A     *%0A     * @see de.csdev.ebus.core.connection.IEBusConnection#open()%0A     */%0A    @Override%0A    public boolean open() throws IOException %7B%0A%0A        channel = DatagramChannel.open();%0A        channel.connect(new InetSocketAddress(this.hostname, this.port));%0A%0A        return true;%0A    %7D%0A%0A    @Override%0A    public boolean isOpen() throws IOException %7B%0A        return channel.isConnected();%0A    %7D%0A%0A    @Override%0A    public boolean isReceiveBufferEmpty() throws IOException %7B%0A        return true;%0A    %7D%0A%0A    @Override%0A    public void reset() throws IOException %7B%0A        // noop%0A    %7D%0A%0A    @Override%0A    public void writeByte(int b) throws IOException %7B%0A        ByteBuffer buffer = ByteBuffer.allocate(1);%0A        buffer.put((byte) b);%0A        channel.write(buffer);%0A    %7D%0A%0A    @Override%0A    public int readByte(boolean lowLatency) throws IOException %7B%0A        ByteBuffer buffer = ByteBuffer.allocate(1);%0A        channel.read(buffer);%0A        return buffer.get(0);%0A    %7D%0A%0A    @Override%0A    public int readBytes(byte%5B%5D buffer) throws IOException %7B%0A        return channel.read(ByteBuffer.wrap(buffer));%0A    %7D%0A%0A    /*%0A     * (non-Javadoc)%0A     *%0A     * @see de.csdev.ebus.core.connection.AbstractEBusConnection#close()%0A     */%0A    @Override%0A    public boolean close() throws IOException %7B%0A%0A        channel.disconnect().close();%0A        channel = null;%0A%0A        return true;%0A    %7D%0A%0A%7D%0A

Add first version of untested UDP connector