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