|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.goldeninnovations.smp.SMPServer
public class SMPServer
Simple Message Processor Server
Constructor Summary | |
---|---|
SMPServer(MessageProcessor messageProcessor)
|
|
SMPServer(MessageSpool spool,
MessageFilter filter,
MessageProcessor processor)
|
Method Summary | |
---|---|
void |
connectionClosed(com.goldeninnovations.smp.smtp.Connection connection)
Remove closed Connections from the connectionMap |
int |
getCurrentConnectionCount()
The number of open connections |
MessageFilter |
getMessageFilter()
|
MessageProcessor |
getMessageProcessor()
|
MessageSpool |
getMessageSpool()
The MessageSpool currently being used. |
long |
getTotalConnectionCount()
The total number of connections made to SMPServer |
void |
setMessageFilter(MessageFilter messageFilter)
|
void |
setMessageProcessor(MessageProcessor messageProcessor)
|
void |
setMessageSpool(MessageSpool messageSpool)
Sets the MessageSpool to use. |
void |
setPort(int port)
Sets the port that the Server will listen to SMTP connections on. |
void |
startServer()
Starts the Server. |
void |
stopServer()
Stops the server and waits for the thread to end. |
void |
stopServer(long millis)
Stops the server and waits for the thread to end. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SMPServer(MessageProcessor messageProcessor)
public SMPServer(MessageSpool spool, MessageFilter filter, MessageProcessor processor)
Method Detail |
---|
public void setPort(int port)
port
- the port the server will listen on.public MessageSpool getMessageSpool()
MessageSpool
currently being used.
MessageSpool
public void setMessageSpool(MessageSpool messageSpool)
MessageSpool
to use.
messageSpool
- the MessageSpool
to use.public MessageFilter getMessageFilter()
public void setMessageFilter(MessageFilter messageFilter)
public MessageProcessor getMessageProcessor()
public void setMessageProcessor(MessageProcessor messageProcessor)
public int getCurrentConnectionCount()
SMPServerMBean
getCurrentConnectionCount
in interface SMPServerMBean
public long getTotalConnectionCount()
SMPServerMBean
getTotalConnectionCount
in interface SMPServerMBean
public void startServer() throws IOException
This method returns as soon as the server is started.
startServer
in interface SMPServerMBean
IOException
- thrown if the server was unable to open the specified port.public void stopServer() throws InterruptedException
stopServer
in interface SMPServerMBean
InterruptedException
- thrown if interrupted while waiting for
the server thread to end.public void stopServer(long millis) throws InterruptedException
millis
- the time to wait for each inner thread to stop in milliseconds.
InterruptedException
- thrown if interrupted while waiting for
the server thread to end.public void connectionClosed(com.goldeninnovations.smp.smtp.Connection connection)
connectionClosed
in interface com.goldeninnovations.smp.smtp.ConnectionListener
connection
- the connection that closed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |