java.lang.Object
org.eclipse.emf.mwe.internal.core.debug.communication.PackageSender
All Implemented Interfaces:
Runnable

public class PackageSender extends Object implements Runnable
This Runnable sends packages out asynchroniously as they arrive from customers.
  • Method Details

    • newPackageSender

      public static PackageSender newPackageSender(Connection connection)
      create a new instance and starts the runnable in a new thread
      Parameters:
      connection - the Connection that controls this data receiver.
      Returns:
      the instance
    • sendPackage

      public int sendPackage(AbstractPackage packet) throws InterruptedIOException
      Add a packet to be sent to the other side.
      Parameters:
      packet - the packet
      Returns:
      the packet id after it was sent
      Throws:
      InterruptedIOException
    • close

      public void close()
      stop the sender thread.
    • run

      public void run()
      Specified by:
      run in interface Runnable