org.eclipse.wst.jsdt.chromium.util

## Class RelaySyncCallback.Guard

- java.lang.Object
- - org.eclipse.wst.jsdt.chromium.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

Constructors
Constructor and Description
`Guard()`

### Method Summary

All Methods Instance Methods Concrete Methods
`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

#### Guard

    public 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.eclipse.wst.jsdt.chromium.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()