|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ServletContainerAdapter
Implement this to provide your own servlet container (instance),
It's OK if you don't start or stop your container when this adapter is
called. You can treat the startIfNotRunning()
and
stopIfRunning()
methods as suggestions, they only indicate what
the UPnP stack wants to do. If your servlet container handles other
services, keep it running all the time.
An implementation must be thread-safe, all methods might be called concurrently by several threads.
Method Summary | |
---|---|
int |
addConnector(String host,
int port)
Might be called several times to set up the connectors. |
void |
registerServlet(String contextPath,
javax.servlet.Servlet servlet)
Might be called several times register (the same) handler for UPnP requests, should only register it once. |
void |
startIfNotRunning()
Start your servlet container if it isn't already running, might be called multiple times. |
void |
stopIfRunning()
Stop your servlet container if it's still running, might be called multiple times. |
Method Detail |
---|
int addConnector(String host, int port) throws IOException
host
- The host address for the socket.port
- The port, might be -1
to bind to an ephemeral port.
IOException
- If the connector couldn't be opened to retrieve the registered local port.void registerServlet(String contextPath, javax.servlet.Servlet servlet)
contextPath
- The context path prefix for all UPnP requests.servlet
- The servlet handling all UPnP requests.void startIfNotRunning()
void stopIfRunning()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |