Package org.jupnp.transport.impl
Klasse ServletStreamServerImpl
java.lang.Object
org.jupnp.transport.impl.ServletStreamServerImpl
- Alle implementierten Schnittstellen:
Runnable,StreamServer<ServletStreamServerConfigurationImpl>
public class ServletStreamServerImpl
extends Object
implements StreamServer<ServletStreamServerConfigurationImpl>
Servlet stream server implementation.
- Autor:
- Christian Bauer - Initial contribution to work with Servlet 3.0, Ivan Iliev - Added support for runtime switch to Servlet 2.4
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected final ServletStreamServerConfigurationImplprotected int -
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungServletStreamServerImpl(ServletStreamServerConfigurationImpl configuration) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected javax.servlet.ServletcreateAsyncServlet(Router router) protected javax.servlet.ServletcreateBlockingServlet(Router router) intgetPort()This method will be called potentially right afterStreamServer.init(java.net.InetAddress, org.jupnp.transport.Router), the actual assigned local port must be available before the server is started.voidinit(InetAddress bindAddress, Router router) Configures the service and starts any listening sockets.voidrun()voidstop()Stops the service, closes any listening sockets.
-
Felddetails
-
configuration
-
localPort
protected int localPort
-
-
Konstruktordetails
-
ServletStreamServerImpl
-
-
Methodendetails
-
getConfiguration
- Angegeben von:
getConfigurationin SchnittstelleStreamServer<ServletStreamServerConfigurationImpl>- Gibt zurück:
- This service's configuration.
-
init
Beschreibung aus Schnittstelle kopiert:StreamServerConfigures the service and starts any listening sockets.- Angegeben von:
initin SchnittstelleStreamServer<ServletStreamServerConfigurationImpl>- Parameter:
bindAddress- The address to bind any sockets on.router- The router which handles the incomingUpnpStream.- Löst aus:
InitializationException- If the service could not be initialized or started.
-
getPort
public int getPort()Beschreibung aus Schnittstelle kopiert:StreamServerThis method will be called potentially right afterStreamServer.init(java.net.InetAddress, org.jupnp.transport.Router), the actual assigned local port must be available before the server is started.- Angegeben von:
getPortin SchnittstelleStreamServer<ServletStreamServerConfigurationImpl>- Gibt zurück:
- The TCP port this service is listening on, e.g. the actual ephemeral port.
-
stop
public void stop()Beschreibung aus Schnittstelle kopiert:StreamServerStops the service, closes any listening sockets.- Angegeben von:
stopin SchnittstelleStreamServer<ServletStreamServerConfigurationImpl>
-
run
public void run() -
createAsyncServlet
-
createBlockingServlet
-