RelaySyncCallback.Guard
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.util
Class RelaySyncCallback.Guard

    java.lang.Object
      org.chromium.sdk.util.RelaySyncCallback.Guard

Enclosing class:
  RelaySyncCallback

    public class RelaySyncCallback.Guard

extends java.lang.Object

Responsible for calling SyncCallback unless operation has been successfully relayed to the next step.

Constructor Summary
`RelaySyncCallback.Guard()`

Method Summary
`SyncCallback` | `asSyncCallback()`
`void` | `discharge(RelayOk relayed)` This method should be called when operations was successfully relayed.
`RelaySyncCallback` | `getRelay()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RelaySyncCallback.Guard

    public RelaySyncCallback.Guard()

Method Detail

### discharge

    public void discharge(RelayOk relayed)

  This method should be called when operations was successfully relayed. This is typically a last statement in operation step, right before relay call. Failing to call `discharge(org.chromium.sdk.RelayOk)` (because of abnormal finishing) would cause guard to call `SyncCallback` meaning the termination of the operation.

  Parameters:
    `relayed` -

### asSyncCallback

    public SyncCallback asSyncCallback()

  Returns:
    guard wrapped as `SyncCallback` that that would let the guard to fulfill its main contract

### getRelay

    public RelaySyncCallback getRelay()

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