1 /* 2 Licensed under the Apache License, Version 2.0 (the "License"); 3 you may not use this file except in compliance with the License. 4 You may obtain a copy of the License at 5 6 http://www.apache.org/licenses/LICENSE-2.0 7 8 Unless required by applicable law or agreed to in writing, software 9 distributed under the License is distributed on an "AS IS" BASIS, 10 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 See the License for the specific language governing permissions and 12 limitations under the License. 13 */ 14 package uk.nhs.interoperability.client.samples; 15 16 import uk.nhs.interoperability.consumer.AbstractCallbackListenerServlet; 17 import uk.nhs.interoperability.infrastructure.ITKAckDetails; 18 import uk.nhs.interoperability.payload.ITKMessage; 19 import uk.nhs.interoperability.source.ITKCallbackHandler; 20 import uk.nhs.interoperability.util.Logger; 21 22 /** 23 * The Class RoutedMessageCallbackHandler. 24 * 25 * @author Michael Odling-Smee 26 * @author Nicholas Jones 27 * @since 0.1 28 */ 29 public class RoutedMessageCallbackHandler extends AbstractCallbackListenerServlet implements ITKCallbackHandler { 30 31 /** The Constant serialVersionUID. */ 32 private static final long serialVersionUID = -541728545823668074L; 33 34 /* (non-Javadoc) 35 * @see uk.nhs.interoperability.source.ITKCallbackHandler#onMessage(uk.nhs.interoperability.payload.ITKMessage) 36 */ 37 @Override 38 public void onMessage(ITKMessage request) { 39 Logger.trace("This is my example routed message callback handler:onMessage()"); 40 } 41 42 /* (non-Javadoc) 43 * @see uk.nhs.interoperability.source.ITKCallbackHandler#onAck(uk.nhs.interoperability.infrastructure.ITKAckDetails) 44 */ 45 @Override 46 public void onAck(ITKAckDetails ack) { 47 Logger.trace("This is my example routed message callback handler:onAck()"); 48 } 49 50 /* (non-Javadoc) 51 * @see uk.nhs.interoperability.source.ITKCallbackHandler#onNack(uk.nhs.interoperability.infrastructure.ITKAckDetails) 52 */ 53 @Override 54 public void onNack(ITKAckDetails nack) { 55 Logger.trace("This is my example routed message callback handler:onNack()"); 56 } 57 58 /* (non-Javadoc) 59 * @see uk.nhs.interoperability.consumer.AbstractCallbackListenerServlet#getCallbackHandler() 60 */ 61 @Override 62 public ITKCallbackHandler getCallbackHandler() { 63 return this; 64 } 65 66 }