1 23 package com.sun.enterprise.jbi.serviceengine.comm; 24 25 import com.sun.enterprise.jbi.serviceengine.work.WorkManager; 26 import com.sun.enterprise.jbi.serviceengine.work.OneWork; 27 import java.util.logging.Level ; 28 import java.util.logging.Logger ; 29 30 43 public class MessageReceiver extends OneWork { 44 45 48 public void receive() { 49 execute(); 50 } 51 52 56 public void release() { 57 synchronized (this) { 58 notify(); 59 } 60 } 61 62 66 public void doWork() { 67 MessageAcceptor acceptor = getWorkManager().getMessageAcceptor(); 68 acceptor.register(this); 69 70 synchronized (this) { 71 try { 72 wait(); 73 } catch (InterruptedException ie) { 74 setException(ie); 75 } 76 } 77 } 78 79 } 80 81 | Popular Tags |