org.teleal.cling.transport.impl
Class StreamServerImpl
java.lang.Object
org.teleal.cling.transport.impl.StreamServerImpl
- All Implemented Interfaces:
- Runnable, StreamServer<StreamServerConfigurationImpl>
public class StreamServerImpl
- extends Object
- implements StreamServer<StreamServerConfigurationImpl>
Implementation based on the built-in SUN JDK 6.0 HTTP Server.
See the
documentation of the SUN JDK 6.0 HTTP Server.
- Author:
- Christian Bauer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
configuration
protected final StreamServerConfigurationImpl configuration
server
protected com.sun.net.httpserver.HttpServer server
StreamServerImpl
public StreamServerImpl(StreamServerConfigurationImpl configuration)
init
public void init(InetAddress bindAddress,
Router router)
throws InitializationException
- Description copied from interface:
StreamServer
- Configures the service and starts any listening sockets.
- Specified by:
init
in interface StreamServer<StreamServerConfigurationImpl>
- Parameters:
bindAddress
- The address to bind any sockets on.router
- The router which handles the incoming UpnpStream
.
- Throws:
InitializationException
- If the service could not be initialized or started.
getPort
public int getPort()
- Specified by:
getPort
in interface StreamServer<StreamServerConfigurationImpl>
- Returns:
- The TCP port this service is listening on, e.g. the actual ephemeral port.
getConfiguration
public StreamServerConfigurationImpl getConfiguration()
- Specified by:
getConfiguration
in interface StreamServer<StreamServerConfigurationImpl>
- Returns:
- This service's configuration.
run
public void run()
- Specified by:
run
in interface Runnable
stop
public void stop()
- Description copied from interface:
StreamServer
- Stops the service, closes any listening sockets.
- Specified by:
stop
in interface StreamServer<StreamServerConfigurationImpl>
Copyright © 2010 Teleal GmbH, Switzerland. All Rights Reserved.