View Javadoc

1   /*
2    *  soapUI, copyright (C) 2004-2008 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.model.mock;
14  
15  import java.util.List;
16  
17  import com.eviware.soapui.impl.wsdl.mock.WsdlMockService;
18  import com.eviware.soapui.model.TestModelItem;
19  import com.eviware.soapui.model.project.Project;
20  
21  /***
22   * ModelItem for mocking a number of Interfaces and their Operations
23   *  
24   * @author ole.matzura
25   */
26  
27  public interface MockService extends TestModelItem
28  {
29  	public final static String PATH_PROPERTY = WsdlMockService.class.getName() + "@path";
30  	public final static String PORT_PROPERTY = MockService.class.getName() + "@port";
31  	
32  	public Project getProject();
33  	
34  	public int getMockOperationCount();
35  	
36  	public MockOperation getMockOperationAt( int index );
37  	
38  	public MockOperation getMockOperationByName( String name );
39  	
40  	public String getPath();
41  	
42  	public int getPort();
43  	
44  	public MockRunner start() throws Exception;
45  	
46  	public void addMockRunListener( MockRunListener listener );
47  	
48  	public void removeMockRunListener( MockRunListener listener );
49  	
50  	public void addMockServiceListener( MockServiceListener listener );
51  
52  	public void removeMockServiceListener( MockServiceListener listener );
53  
54  	public List<MockOperation> getMockOperationList();
55  }