org.apache.ignite.internal.processors.platform.events

## Class PlatformEvents

- java.lang.Object
- - org.apache.ignite.internal.processors.platform.PlatformAbstractTarget
  - - org.apache.ignite.internal.processors.platform.events.PlatformEvents

All Implemented Interfaces:
  PlatformTarget

    public class PlatformEvents
    extends PlatformAbstractTarget

Interop events.

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.platform.PlatformAbstractTarget

`FALSE, log, platformCtx, TRUE`

### Constructor Summary

Constructors
Constructor and Description
`PlatformEvents(PlatformContext platformCtx, IgniteEvents events)` Ctor.

### Method Summary

Methods
`protected IgniteFuture` `currentFuture()` <inheritDoc />
`protected PlatformFutureUtils.Writer` `futureWriter(int opId)` <inheritDoc />
`boolean` `isEnabled(int type)` Check if event is enabled.
`void` `localListen(long hnd, int type)` Adds an event listener for local events.
`protected long` `processInStreamOutLong(int type, BinaryRawReaderEx reader)` Process IN operation.
`protected void` `processInStreamOutStream(int type, BinaryRawReaderEx reader, BinaryRawWriterEx writer)` Process IN-OUT operation.
`protected void` `processOutStream(int type, BinaryRawWriterEx writer)` Process OUT operation.
`boolean` `stopLocalListen(long hnd)` Removes an event listener for local events.
`PlatformEvents` `withAsync()` Gets events with asynchronous mode enabled.

### Methods inherited from class org.apache.ignite.internal.processors.platform.PlatformAbstractTarget

`convertException, currentFutureWrapped, inObjectStreamOutStream, inStreamOutLong, inStreamOutObject, inStreamOutStream, listenFuture, listenFutureForOperation, outLong, outObject, outStream, platformContext, processInObjectStreamOutStream, processInStreamOutObject, processOutLong, processOutObject, throwUnsupported`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### PlatformEvents

    public PlatformEvents(PlatformContext platformCtx,
                  IgniteEvents events)

Ctor.

Parameters:
  `platformCtx` - Context.
  `events` - Ignite events.

### Method Detail

#### withAsync

    public PlatformEvents withAsync()

Gets events with asynchronous mode enabled.

Returns:
  Events with asynchronous mode enabled.

#### localListen

    public void localListen(long hnd,
                   int type)

Adds an event listener for local events.

Parameters:
  `hnd` - Interop listener handle.
  `type` - Event type.

#### stopLocalListen

    public boolean stopLocalListen(long hnd)

Removes an event listener for local events.

Parameters:
  `hnd` - Interop listener handle.

#### isEnabled

    public boolean isEnabled(int type)

Check if event is enabled.

Parameters:
  `type` - Event type.
Returns:
  `True` if event of passed in type is enabled.

#### processInStreamOutLong

    protected long processInStreamOutLong(int type,
                              BinaryRawReaderEx reader)
                                   throws IgniteCheckedException

Process IN operation.

Overrides:
  `processInStreamOutLong` in class `PlatformAbstractTarget`
Parameters:
  `type` - Type.
  `reader` - Binary reader.
Returns:
  Result.
Throws:
  `IgniteCheckedException` - In case of exception.

#### processInStreamOutStream

    protected void processInStreamOutStream(int type,
                                BinaryRawReaderEx reader,
                                BinaryRawWriterEx writer)
                                     throws IgniteCheckedException

Process IN-OUT operation.

Overrides:
  `processInStreamOutStream` in class `PlatformAbstractTarget`
Parameters:
  `type` - Type.
  `reader` - Binary reader.
  `writer` - Binary writer.
Throws:
  `IgniteCheckedException` - In case of exception.

#### processOutStream

    protected void processOutStream(int type,
                        BinaryRawWriterEx writer)
                             throws IgniteCheckedException

Process OUT operation.

Overrides:
  `processOutStream` in class `PlatformAbstractTarget`
Parameters:
  `type` - Type.
  `writer` - Binary writer.
Throws:
  `IgniteCheckedException` - In case of exception.

#### currentFuture

    protected IgniteFuture currentFuture()
                                  throws IgniteCheckedException

<inheritDoc />

Overrides:
  `currentFuture` in class `PlatformAbstractTarget`
Returns:
  current future.
Throws:
  `IgniteCheckedException`

#### futureWriter

    @Nullable
    protected PlatformFutureUtils.Writer futureWriter(int opId)

<inheritDoc />

Overrides:
  `futureWriter` in class `PlatformAbstractTarget`
Parameters:
  `opId` - Operation id.
Returns:
  A custom writer for given op id.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.5.0.final
Release Date | : December 29 2015