Class PackageSender
java.lang.Object
org.eclipse.emf.mwe.internal.core.debug.communication.PackageSender
- All Implemented Interfaces:
Runnable
This Runnable sends packages out asynchroniously as they arrive from customers.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
stop the sender thread.static PackageSender
newPackageSender
(Connection connection) create a new instance and starts the runnable in a new threadvoid
run()
int
sendPackage
(AbstractPackage packet) Add a packet to be sent to the other side.
-
Method Details
-
newPackageSender
create a new instance and starts the runnable in a new thread- Parameters:
connection
- theConnection
that controls this data receiver.- Returns:
- the instance
-
sendPackage
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()
-