...
Interceptor | Task |
---|---|
org.apache.cxf.ws.rm.RMOutInterceptor | Responsible for sending CreateSequence requests and waiting for their CreateSequenceResponse responses, and and aggregating the sequence properties (id and message number) for an application message. |
org.apache.cxf.ws.rm.RMInInterceptor | Intercepting and processing RM protocol messages (these will not the application level), as well as SequenceAcknowledgments piggybacked on application messages. |
org.apache.cxf.ws.rm.RMCaptureInInterceptor | Caching incoming messages for later retransmissionpersistent storage. |
org.apache.cxf.ws.rm.RMDeliveryInterceptor | Assuring InOrder delivery of messages to the application. |
org.apache.cxf.ws.rm.soap.RMSoapInterceptor | Encoding and decoding the RM headers |
org.apache.cxf.ws.rm.soap.RetransmissionInterceptor | Responsible for creating copies of application messages for future resends. |
...
Code Block |
---|
private static class AcknowledgementListener implements NotificationListener { private volatile long lastAcknowledgement; @Override public void handleNotification(Notification notification, Object handback) { if (notification instanceof AcknowledgementNotification) { AcknowledgementNotification ack = (AcknowledgementNotification)notification; lastAcknowledgement = ack.getMessageNumber(); } } } // initialize client ... // attach to JMX bean for notifications // NOTE: you must have sent at least one message to initialize RM before executing this code Endpoint ep = ClientProxy.getClient(client).getEndpoint(); InstrumentationManager im = bus.getExtension(InstrumentationManager.class); MBeanServer mbs = im.getMBeanServer(); RMManager clientManager = bus.getExtension(RMManager.class); ObjectName name = RMUtils.getManagedObjectName(clientManager, ep); System.out.println("Looking for endpoint name " + name); AcknowledgementListener listener = new AcknowledgementListener(); mbs.addNotificationListener(name, listener, null, null); // send messages using RM with acknowledgement status reported to listener ... |