Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.teleal.cling.transport
Interface SwitchableRouter

All Superinterfaces:
  Router

All Known Implementing Classes:
  AndroidWifiSwitchableRouter, 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

Method Summary
`boolean` | `disable()`
`boolean` | `enable()`
`void` | `handleStartFailure(InitializationException ex)` Called by the `enable()` method before it returns.
`boolean` | `isEnabled()`

Methods inherited from interface org.teleal.cling.transport.Router
`broadcast, getActiveStreamServers, getConfiguration, getNetworkAddressFactory, getProtocolFactory, received, received, send, send, shutdown`

Method Detail

### 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011 Teleal GmbH, Switzerland. All Rights Reserved.