Package org.eclipse.emf.cdo.session.remote

# Class CDORemoteSessionRequest

java.lang.Object
org.eclipse.emf.cdo.session.remote.CDORemoteSessionRequest

public final class CDORemoteSessionRequest extends Object
An asynchronous request to a `remote session`.

Since:
  4.17
Author:
  Eike Stepper

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static class`
`CDORemoteSessionRequest.GlobalRequestHandler`
`static class`
`CDORemoteSessionRequest.RequestHandler`

## Field Summary

Fields
Modifier and Type
Field
Description
`static final long`
`DEFAULT_TIMEOUT`

## Constructor Summary

Constructors
Constructor
Description
`CDORemoteSessionRequest(String type)`
`CDORemoteSessionRequest(String type, byte[] data)`

## Method Summary

Modifier and Type
Method
Description
`static BiConsumer<String,Throwable>`
`getDefaultExceptionHandler()`
`static Consumer<String>`
`getDefaultTimeoutHandler()`
`CDORemoteSessionRequest`
`onException(BiConsumer<String,Throwable> exceptionHandler)`
`CDORemoteSessionRequest`
`onResponse(Consumer<byte[]> responseConsumer)`
`CDORemoteSessionRequest`
`onTimeout(Consumer<String> timeoutHandler)`
`void`
`send(CDORemoteSession recipient)`
`void`
`sendSynchronous(CDORemoteSession recipient)`
`static void`
`setDefaultExceptionHandler(BiConsumer<String,Throwable> defaultExceptionHandler)`
`static void`
`setDefaultTimeoutHandler(Consumer<String> defaultTimeoutHandler)`
`long`
`timeout()`
`CDORemoteSessionRequest`
`timeout(long timeout)`

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

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

## Field Details

### DEFAULT_TIMEOUT

public static final long DEFAULT_TIMEOUT

## Constructor Details

### CDORemoteSessionRequest

public CDORemoteSessionRequest(String type, byte[] data)

### CDORemoteSessionRequest

public CDORemoteSessionRequest(String type)

## Method Details

### timeout

public long timeout()

### timeout

public CDORemoteSessionRequest timeout(long timeout)

### onTimeout

public CDORemoteSessionRequest onTimeout(Consumer<String> timeoutHandler)

### onException

public CDORemoteSessionRequest onException(BiConsumer<String,Throwable> exceptionHandler)

### onResponse

public CDORemoteSessionRequest onResponse(Consumer<byte[]> responseConsumer)

### send

public void send(CDORemoteSession recipient)

### sendSynchronous

public void sendSynchronous(CDORemoteSession recipient)

### getDefaultTimeoutHandler

public static Consumer<String> getDefaultTimeoutHandler()

### setDefaultTimeoutHandler

public static void setDefaultTimeoutHandler(Consumer<String> defaultTimeoutHandler)

### getDefaultExceptionHandler

public static BiConsumer<String,Throwable> getDefaultExceptionHandler()

### setDefaultExceptionHandler

public static void setDefaultExceptionHandler(BiConsumer<String,Throwable> defaultExceptionHandler)