View Javadoc

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.consumer.smsp;
15  
16  import uk.nhs.interoperability.consumer.AbstractSimpleMessageServlet;
17  import uk.nhs.interoperability.consumer.ITKMessageConsumer;
18  import uk.nhs.interoperability.consumer.appemulator.SimpleApplicationEmulator;
19  
20  /**
21   * The Class SMSProviderServlet.
22   *
23   * @author Michael Odling-Smee
24   * @author Nicholas Jones
25   * @since 0.1
26   */
27  public class SMSProviderServlet extends AbstractSimpleMessageServlet {
28  	
29  	private ITKMessageConsumer applicationLayer;
30  
31  	/** The Constant serialVersionUID. */
32  	private static final long serialVersionUID = 5255040112826524728L;
33  
34  	/**
35  	 * Instantiates a new SMSProviderServlet.
36  	 */
37  	public SMSProviderServlet() {
38  		/*
39  		 * In reality this would be bound to a real application
40  		 * layer component - using a simple emulator for the
41  		 * samples
42  		 */		
43  		this.applicationLayer = new SimpleApplicationEmulator();
44  	}
45  
46  	/* (non-Javadoc)
47  	 * @see uk.nhs.interoperability.consumer.AbstractSimpleMessageServlet#getMessageConsumer()
48  	 */
49  	@Override
50  	public ITKMessageConsumer getMessageConsumer() {
51  		return this.applicationLayer;
52  	}
53  
54  }