01 package org.apache.qpid.client.transport;
02
03 import org.apache.qpid.thread.Threading;
04
05 import edu.emory.mathcs.backport.java.util.concurrent.Executor;
06
07 public class QpidThreadExecutor implements Executor
08 {
09 @Override
10 public void execute(Runnable command)
11 {
12 try
13 {
14 Threading.getThreadFactory().createThread(command).start();
15 }
16 catch(Exception e)
17 {
18 throw new RuntimeException("Error creating a thread using Qpid thread factory",e);
19 }
20 }
21
22 }
|