org.apache.james.mpt
Class ExternalHostSystem
java.lang.Object
org.apache.james.mpt.ExternalSessionFactory
org.apache.james.mpt.ExternalHostSystem
- All Implemented Interfaces:
- HostSystem, SessionFactory
public class ExternalHostSystem
- extends ExternalSessionFactory
- implements HostSystem
Connects to a host system serving on an open port.
This is typically used for functional integration testing of a complete
server system (including sockets). Apache James MPT AntLib provides an
Ant task suitable for this
use case.
Constructor Summary |
ExternalHostSystem(java.lang.String host,
int port,
Monitor monitor,
java.lang.String shabang,
UserAdder userAdder)
Constructs a host system suitable for connection to an open port. |
Method Summary |
void |
addUser(java.lang.String user,
java.lang.String password)
Add a user for testing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ExternalHostSystem
public ExternalHostSystem(java.lang.String host,
int port,
Monitor monitor,
java.lang.String shabang,
UserAdder userAdder)
- Constructs a host system suitable for connection to an open port.
- Parameters:
host
- host name that will be connected to, not nullport
- port on host that will be connected to, not nullmonitor
- monitors the conduct of the connectionshabang
- protocol shabang will be sent to the script test in the place of the
first line received from the server. Many protocols pass server specific information
in the first line. When not null, this line will be replaced.
Or null when the first line should be passed without replacementuserAdder
- null when test system has appropriate users already set
addUser
public void addUser(java.lang.String user,
java.lang.String password)
throws java.lang.Exception
- Description copied from interface:
HostSystem
- Add a user for testing.
- Specified by:
addUser
in interface HostSystem
- Parameters:
user
- user namepassword
- user password
- Throws:
java.lang.Exception
Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.