org.fourthline.cling.transport
Interface SwitchableRouter
- All Superinterfaces:
- Router
- All Known Implementing Classes:
- AndroidSwitchableRouter, SwitchableRouterImpl
public interface SwitchableRouter
- extends Router
Switchable network transport layer interface.
This router can be turned on and off, it will shutdown all listening
threads and close all listening sockets when it is disabled, and
rebind when it is enabled.
While disabled, only mock responses (mostly null
) will be returned
from this network transport layer, and all operations are NOOPs.
- Author:
- Christian Bauer
isEnabled
boolean isEnabled()
enable
boolean enable()
- Returns:
true
if the router was enabled. false
if it's already running.
disable
boolean disable()
- Returns:
true
if the router was disabled. false
if it wasn't running.
handleStartFailure
void handleStartFailure(InitializationException ex)
- Called by the
enable()
method before it returns.
- Parameters:
ex
- The cause of the failure.
Copyright © 2013 4th Line GmbH, Switzerland. All Rights Reserved.