View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2010 eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of version 2.1 of the GNU Lesser General Public License as published by 
6    *  the Free Software Foundation.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
10   *  See the GNU Lesser General Public License for more details at gnu.org.
11   */
12  
13  package com.eviware.soapui.impl.wsdl.support;
14  
15  import com.eviware.soapui.impl.wsdl.panels.teststeps.amf.AMFResponse;
16  import com.eviware.soapui.impl.wsdl.teststeps.AMFRequestTestStep;
17  
18  /***
19   * 
20   * @author ole.matzura
21   */
22  
23  public class AMFMessageExchange extends AbstractNonHttpMessageExchange<AMFRequestTestStep>
24  {
25  	private final AMFResponse response;
26  	
27  	public AMFMessageExchange( AMFRequestTestStep modelItem, AMFResponse response )
28  	{
29  		super( modelItem );
30  		this.response = response;
31  	}
32  
33  	public String getRequestContent()
34  	{
35  		return response.getRequestContent();
36  	}
37  
38  	public String getResponseContent()
39  	{
40  		return response.getContentAsString();
41  	}
42  
43  	public long getTimeTaken()
44  	{
45  		return response.getTimeTaken();
46  	}
47  
48  	public long getTimestamp()
49  	{
50  		return response.getTimestamp();
51  	}
52  
53  	public boolean hasRequest( boolean ignoreEmpty )
54  	{
55  		return true;
56  	}
57  
58  	public boolean hasResponse()
59  	{
60  		return getResponseContent()!= null ;
61  	}
62  
63  	public boolean isDiscarded()
64  	{
65  		return false;
66  	}
67  
68  	public String getEndpoint()
69  	{
70  		return response.getRequest().getEndpoint();
71  	}
72  }