|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fourthline.cling.mock.MockUpnpService
@Alternative public class MockUpnpService
Simplifies testing of core and non-core modules.
It uses the MockUpnpService.MockProtocolFactory
.
Nested Class Summary | |
---|---|
static class |
MockUpnpService.MockProtocolFactory
This factory customizes several protocols. |
Nested classes/interfaces inherited from interface org.fourthline.cling.UpnpService |
---|
UpnpService.Shutdown, UpnpService.Start |
Field Summary | |
---|---|
protected UpnpServiceConfiguration |
configuration
|
protected ControlPoint |
controlPoint
|
protected NetworkAddressFactory |
networkAddressFactory
|
protected ProtocolFactory |
protocolFactory
|
protected Registry |
registry
|
protected MockRouter |
router
|
Constructor Summary | |
---|---|
MockUpnpService()
Single-thread of execution for the whole UPnP stack, no ALIVE messages or registry maintenance. |
|
MockUpnpService(boolean sendsAlive,
boolean maintainsRegistry)
Single-thread of execution for the whole UPnP stack, except one background registry maintenance thread. |
|
MockUpnpService(boolean sendsAlive,
boolean maintainsRegistry,
boolean multiThreaded)
|
|
MockUpnpService(boolean sendsAlive,
MockUpnpServiceConfiguration configuration)
|
|
MockUpnpService(MockUpnpServiceConfiguration configuration)
No ALIVE messages. |
Method Summary | |
---|---|
protected ProtocolFactory |
createProtocolFactory(UpnpService service,
boolean sendsAlive)
|
protected MockRouter |
createRouter()
|
UpnpServiceConfiguration |
getConfiguration()
|
ControlPoint |
getControlPoint()
|
ProtocolFactory |
getProtocolFactory()
|
Registry |
getRegistry()
|
MockRouter |
getRouter()
|
void |
shutdown()
Stopping the UPnP stack. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final UpnpServiceConfiguration configuration
protected final ControlPoint controlPoint
protected final ProtocolFactory protocolFactory
protected final Registry registry
protected final MockRouter router
protected final NetworkAddressFactory networkAddressFactory
Constructor Detail |
---|
public MockUpnpService()
public MockUpnpService(MockUpnpServiceConfiguration configuration)
public MockUpnpService(boolean sendsAlive, boolean maintainsRegistry)
public MockUpnpService(boolean sendsAlive, boolean maintainsRegistry, boolean multiThreaded)
public MockUpnpService(boolean sendsAlive, MockUpnpServiceConfiguration configuration)
Method Detail |
---|
protected ProtocolFactory createProtocolFactory(UpnpService service, boolean sendsAlive)
protected MockRouter createRouter()
public UpnpServiceConfiguration getConfiguration()
getConfiguration
in interface UpnpService
public ControlPoint getControlPoint()
getControlPoint
in interface UpnpService
public ProtocolFactory getProtocolFactory()
getProtocolFactory
in interface UpnpService
public Registry getRegistry()
getRegistry
in interface UpnpService
public MockRouter getRouter()
getRouter
in interface UpnpService
public void shutdown()
UpnpService
Clients are required to stop the UPnP stack properly. Notifications for disappearing devices will be multicast'ed, existing event subscriptions cancelled.
shutdown
in interface UpnpService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |