org.opennms.netmgt.provision.server
Class AbstractSimpleServer

java.lang.Object
  extended by org.opennms.netmgt.provision.server.AbstractSimpleServer

public abstract class AbstractSimpleServer
extends Object


Nested Class Summary
static class AbstractSimpleServer.BannerExchange
           
static interface AbstractSimpleServer.Exchange
           
static interface AbstractSimpleServer.RequestMatcher
           
static class AbstractSimpleServer.SimpleServerExchange
           
 
Constructor Summary
AbstractSimpleServer()
           
 
Method Summary
protected  void addRequestResponse(String request, String response)
           
protected  boolean attemptConversation(BufferedReader in, OutputStream out)
           
 InetAddress getInetAddress()
           
 int getLocalPort()
           
 Runnable getRunnable()
           
 int getTimeout()
           
 void init()
           
 void onInit()
           
protected  AbstractSimpleServer.RequestMatcher regexpMatches(String regex)
           
protected  void setExpectedBanner(String banner)
           
 void setTimeout(int timeout)
           
 void startServer()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSimpleServer

public AbstractSimpleServer()
Method Detail

getTimeout

public int getTimeout()

setTimeout

public void setTimeout(int timeout)

getInetAddress

public InetAddress getInetAddress()
Returns:
InetAddress returns the inetaddress from the serversocket.

getLocalPort

public int getLocalPort()

init

public void init()
          throws Exception
Throws:
Exception

onInit

public void onInit()

startServer

public void startServer()
                 throws Exception
Throws:
Exception

getRunnable

public Runnable getRunnable()
                     throws Exception
Throws:
Exception

attemptConversation

protected boolean attemptConversation(BufferedReader in,
                                      OutputStream out)
                               throws IOException
Throws:
IOException

setExpectedBanner

protected void setExpectedBanner(String banner)

addRequestResponse

protected void addRequestResponse(String request,
                                  String response)

regexpMatches

protected AbstractSimpleServer.RequestMatcher regexpMatches(String regex)


Copyright © 2009. All Rights Reserved.