1 /**************************************************************** 2 * Licensed to the Apache Software Foundation (ASF) under one * 3 * or more contributor license agreements. See the NOTICE file * 4 * distributed with this work for additional information * 5 * regarding copyright ownership. The ASF licenses this file * 6 * to you under the Apache License, Version 2.0 (the * 7 * "License"); you may not use this file except in compliance * 8 * with the License. You may obtain a copy of the License at * 9 * * 10 * http://www.apache.org/licenses/LICENSE-2.0 * 11 * * 12 * Unless required by applicable law or agreed to in writing, * 13 * software distributed under the License is distributed on an * 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * 15 * KIND, either express or implied. See the License for the * 16 * specific language governing permissions and limitations * 17 * under the License. * 18 ****************************************************************/ 19 20 package org.apache.james.mpt; 21 22 /** 23 * <p>Host system under test.</p> 24 * <p> 25 * This interface encapsulates the interaction between the server 26 * under test and the test framework. MPT can be used to test components 27 * without the need to serve the protocol though a socket by creating a 28 * suitable implementation of this interface. 29 * </p> 30 * @see ExternalHostSystem ExternalHostSystem (a <code>HostSystem</code> for servers 31 * running independently) 32 * @see Session Session (supports multiple connection to the host system) 33 */ 34 public interface HostSystem extends SessionFactory { 35 36 /** 37 * Resets host system to initial state. 38 * 39 * @throws Exception 40 */ 41 public void reset() throws Exception; 42 43 /** 44 * Add a user for testing. 45 * 46 * @param user 47 * user name 48 * @param password 49 * user password 50 * @throws Exception 51 */ 52 public void addUser(String user, String password) throws Exception; 53 54 public interface Continuation { 55 public void doContinue(); 56 } 57 }