diff options
Diffstat (limited to 'org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteUdpEndpointReceiverImpl.java')
-rw-r--r-- | org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteUdpEndpointReceiverImpl.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteUdpEndpointReceiverImpl.java b/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteUdpEndpointReceiverImpl.java new file mode 100644 index 000000000..697485762 --- /dev/null +++ b/org.eclipse.osee.ote.core/src/org/eclipse/osee/ote/endpoint/OteUdpEndpointReceiverImpl.java @@ -0,0 +1,42 @@ +package org.eclipse.osee.ote.endpoint; + +import java.net.InetSocketAddress; + +public class OteUdpEndpointReceiverImpl { + + private OteEndpointReceiveRunnable oteEndpointReceiveRunnable; + private Thread th; + + public OteUdpEndpointReceiverImpl(InetSocketAddress address){ + oteEndpointReceiveRunnable = new OteEndpointReceiveRunnable(address); + } + + public void start(){ + th = new Thread(oteEndpointReceiveRunnable); + th.setName("OTE UDP Endpoint Receiver"); + th.setDaemon(true); + th.start(); + } + + public void stop(){ + oteEndpointReceiveRunnable.stop(); + th.interrupt(); + } + + public void setDebugOutput(boolean enable){ + oteEndpointReceiveRunnable.setDebugOutput(enable); + } + + public InetSocketAddress getEndpoint(){ + return oteEndpointReceiveRunnable.getAddress(); + } + + public void addDataProcessor(EndpointDataProcessor processor) { + oteEndpointReceiveRunnable.addDataProcessor(processor); + } + + public void removeDataProcessor(EndpointDataProcessor processor) { + oteEndpointReceiveRunnable.removeDataProcessor(processor); + } + +} |