RelayOk
Date: 2012-06-29

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.chromium.sdk
Interface RelayOk

    public interface RelayOk

A symbolic interface that means "callback has been accepted and will be called sooner or later". This interface comes together with `SyncCallback` interface. An asynchronous method typically accepts `SyncCallback` parameter or throws an exception. By contract either an exception is thrown or the caller rely on `SyncCallback` being called sooner or later. This interface as a return type helps correctly write such code:

- inside the method you won't mistakenly 'return' without calling some other `RelayOk`-returning method;
- outside the method you can't call blocking `CallbackSemaphore.acquireDefault(org.chromium.sdk.RelayOk)` without actually calling someone `RelayOk`-returning.

All this checks are done by compiler. The actual value of this type is not used.

This helps to prove that nobody will wait forever for a call-back that is never actually going to be called.

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