public abstract class AbstractSimpleServer extends Object
Abstract AbstractSimpleServer class.
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
AbstractSimpleServer.BannerExchange  | 
static interface  | 
AbstractSimpleServer.Exchange  | 
static interface  | 
AbstractSimpleServer.RequestMatcher  | 
static class  | 
AbstractSimpleServer.SimpleServerExchange  | 
| Constructor and Description | 
|---|
AbstractSimpleServer()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
addRequestResponse(String request,
                  String response)
addRequestResponse 
 | 
protected boolean | 
attemptConversation(BufferedReader in,
                   OutputStream out)
attemptConversation 
 | 
InetAddress | 
getInetAddress()
getInetAddress 
 | 
int | 
getLocalPort()
getLocalPort 
 | 
Runnable | 
getRunnable()
getRunnable 
 | 
int | 
getTimeout()
getTimeout 
 | 
void | 
init()
init 
 | 
protected void | 
onInit()
onInit 
 | 
protected AbstractSimpleServer.RequestMatcher | 
regexpMatches(String regex)
regexpMatches 
 | 
protected void | 
setExpectedBanner(String banner)
setExpectedBanner 
 | 
void | 
setTimeout(int timeout)
setTimeout 
 | 
void | 
startServer()
startServer 
 | 
public int getTimeout()
getTimeout
public void setTimeout(int timeout)
setTimeout
timeout - a int.public InetAddress getInetAddress()
getInetAddress
public int getLocalPort()
getLocalPort
protected void onInit()
onInit
protected boolean attemptConversation(BufferedReader in, OutputStream out) throws IOException
attemptConversation
in - a BufferedReader object.out - a OutputStream object.IOException - if any.protected void setExpectedBanner(String banner)
setExpectedBanner
banner - a String object.protected void addRequestResponse(String request, String response)
addRequestResponse
protected AbstractSimpleServer.RequestMatcher regexpMatches(String regex)
regexpMatches
regex - a String object.AbstractSimpleServer.RequestMatcher object.Copyright © 2020. All rights reserved.