|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fourthline.cling.transport.impl.StreamServerImpl
public class StreamServerImpl
Implementation based on the built-in SUN JDK 6.0 HTTP Server.
See the documentation of the SUN JDK 6.0 HTTP Server.
This implementation DOES NOT WORK on Android. Read the Cling manual for alternatives for Android.
Field Summary | |
---|---|
protected StreamServerConfigurationImpl |
configuration
|
protected com.sun.net.httpserver.HttpServer |
server
|
Constructor Summary | |
---|---|
StreamServerImpl(StreamServerConfigurationImpl configuration)
|
Method Summary | |
---|---|
StreamServerConfigurationImpl |
getConfiguration()
|
int |
getPort()
This method will be called potentially right after StreamServer.init(java.net.InetAddress, org.fourthline.cling.transport.Router) , the
actual assigned local port must be available before the server is started. |
void |
init(InetAddress bindAddress,
Router router)
Configures the service and starts any listening sockets. |
void |
run()
|
void |
stop()
Stops the service, closes any listening sockets. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final StreamServerConfigurationImpl configuration
protected com.sun.net.httpserver.HttpServer server
Constructor Detail |
---|
public StreamServerImpl(StreamServerConfigurationImpl configuration)
Method Detail |
---|
public void init(InetAddress bindAddress, Router router) throws InitializationException
StreamServer
init
in interface StreamServer<StreamServerConfigurationImpl>
bindAddress
- The address to bind any sockets on.router
- The router which handles the incoming UpnpStream
.
InitializationException
- If the service could not be initialized or started.public int getPort()
StreamServer
StreamServer.init(java.net.InetAddress, org.fourthline.cling.transport.Router)
, the
actual assigned local port must be available before the server is started.
getPort
in interface StreamServer<StreamServerConfigurationImpl>
public StreamServerConfigurationImpl getConfiguration()
getConfiguration
in interface StreamServer<StreamServerConfigurationImpl>
public void run()
run
in interface Runnable
public void stop()
StreamServer
stop
in interface StreamServer<StreamServerConfigurationImpl>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |