public class TcpServerController extends Object implements IAgentController
Constructor and Description |
---|
TcpServerController(IExceptionLogger logger)
New controller instance.
|
Modifier and Type | Method and Description |
---|---|
protected ServerSocket |
createServerSocket(AgentOptions options)
Open a server socket based on the given configuration.
|
protected InetAddress |
getInetAddress(String address)
Returns the
InetAddress object to open the server socket on. |
void |
shutdown()
Shutdown the agent controller and clean up any resources it has created.
|
void |
startup(AgentOptions options,
IRuntime runtime)
Configure the agent controller with the supplied options and connect it
to the coverage runtime
|
void |
writeExecutionData()
Write all execution data in the runtime to a location determined by the
agent controller.
|
public TcpServerController(IExceptionLogger logger)
logger
- logger to use in case of exceptions is spawned threadspublic void startup(AgentOptions options, IRuntime runtime) throws IOException
IAgentController
startup
in interface IAgentController
options
- Options used to configure the agent controllerruntime
- Coverage runtime this agent controller will be connected toIOException
public void shutdown() throws Exception
IAgentController
shutdown
in interface IAgentController
Exception
- in case shutdown failspublic void writeExecutionData() throws IOException
IAgentController
writeExecutionData
in interface IAgentController
IOException
protected ServerSocket createServerSocket(AgentOptions options) throws IOException
options
- address and port configurationIOException
protected InetAddress getInetAddress(String address) throws UnknownHostException
InetAddress
object to open the server socket on.address
- address specified as a stringUnknownHostException
Copyright © 2013. All Rights Reserved.