org.opennms.netmgt.provision.server
Class SimpleServer
java.lang.Object
org.opennms.netmgt.provision.server.exchange.SimpleConversationEndPoint
org.opennms.netmgt.provision.server.SimpleServer
- Direct Known Subclasses:
- Pop3Server, SSLServer
public class SimpleServer
- extends SimpleConversationEndPoint
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleServer
public SimpleServer()
setBanner
public void setBanner(String banner)
getBanner
public String getBanner()
getInetAddress
public InetAddress getInetAddress()
- Returns:
- InetAddress returns the inetaddress from the serversocket.
getLocalPort
public int getLocalPort()
setThreadSleepLength
public void setThreadSleepLength(int timeout)
getThreadSleepLength
public int getThreadSleepLength()
init
public void init()
throws Exception
- Overrides:
init in class SimpleConversationEndPoint
- Throws:
Exception
onInit
public void onInit()
- Overrides:
onInit in class SimpleConversationEndPoint
startServer
public void startServer()
throws Exception
- Throws:
Exception
stopServer
public void stopServer()
throws IOException
- Throws:
IOException
dispose
public void dispose()
getRunnable
protected Runnable getRunnable()
throws Exception
- Throws:
Exception
sendBanner
protected void sendBanner(OutputStream out)
throws IOException
- Throws:
IOException
attemptConversation
protected boolean attemptConversation(BufferedReader in,
OutputStream out)
throws Exception
- Parameters:
in - out -
- Returns:
-
- Throws:
Exception
addErrorHandler
protected void addErrorHandler(RequestHandler requestHandler)
errorString
protected RequestHandler errorString(String error)
shutdownServer
protected RequestHandler shutdownServer(String response)
setServerSocket
public void setServerSocket(ServerSocket serverSocket)
getServerSocket
public ServerSocket getServerSocket()
setSocket
public void setSocket(Socket socket)
getSocket
public Socket getSocket()
setServerThread
protected void setServerThread(Thread serverThread)
getServerThread
protected Thread getServerThread()
Copyright © 2009. All Rights Reserved.