Package it.ernytech.tdlib

## Class TdCallback

- java.lang.Object
- - it.ernytech.tdlib.TdCallback

    public class TdCallback
    extends java.lang.Object

Interface of callback for interaction with TDLib.

### Constructor Summary

Constructors
`TdCallback​(CloseCallback closeCallback)` Creates a new TdCallback.
`TdCallback​(ErrorCallback errorCallback)` Creates a new TdCallback.
`TdCallback​(ErrorCallback errorCallback, CloseCallback closeCallback)` Creates a new TdCallback.
`TdCallback​(ReceiveCallback receiveCallback)` Creates a new TdCallback.
`TdCallback​(ReceiveCallback receiveCallback, CloseCallback closeCallback)` Creates a new TdCallback.
`TdCallback​(ReceiveCallback receiveCallback, ErrorCallback errorCallback)` Creates a new TdCallback.
`TdCallback​(ReceiveCallback receiveCallback, ErrorCallback errorCallback, CloseCallback closeCallback)` Creates a new TdCallback.

### Method Summary

All Methods Instance Methods Concrete Methods
`CloseCallback` `getCloseCallback()` Get CloseCallback.
`ErrorCallback` `getErrorCallback()` Get ErrorCallback.
`ReceiveCallback` `getReceiveCallback()` Get ReceiveCallback.

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

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

### Constructor Detail

#### TdCallback

    public TdCallback​(ReceiveCallback receiveCallback,
                      ErrorCallback errorCallback,
                      CloseCallback closeCallback)

Creates a new TdCallback.

Parameters:
  `receiveCallback` - Interface of callback for receive incoming update or request response.
  `errorCallback` - Interface of callback for receive incoming error response.
  `closeCallback` - Interface of callback for receive notification of closing Tdlib.

#### TdCallback

    public TdCallback​(ReceiveCallback receiveCallback)

Creates a new TdCallback.

Parameters:
  `receiveCallback` - Interface of callback for receive incoming update or request response.

#### TdCallback

    public TdCallback​(ErrorCallback errorCallback)

Creates a new TdCallback.

Parameters:
  `errorCallback` - Interface of callback for receive incoming error response.

#### TdCallback

    public TdCallback​(CloseCallback closeCallback)

Creates a new TdCallback.

Parameters:
  `closeCallback` - Interface of callback for receive notification of closing Tdlib.

#### TdCallback

    public TdCallback​(ReceiveCallback receiveCallback,
                      ErrorCallback errorCallback)

Creates a new TdCallback.

Parameters:
  `receiveCallback` - Interface of callback for receive incoming update or request response.
  `errorCallback` - Interface of callback for receive incoming error response.

#### TdCallback

    public TdCallback​(ErrorCallback errorCallback,
                      CloseCallback closeCallback)

Creates a new TdCallback.

Parameters:
  `errorCallback` - Interface of callback for receive incoming error response.
  `closeCallback` - Interface of callback for receive notification of closing Tdlib.

#### TdCallback

    public TdCallback​(ReceiveCallback receiveCallback,
                      CloseCallback closeCallback)

Creates a new TdCallback.

Parameters:
  `receiveCallback` - Interface of callback for receive incoming update or request response.
  `closeCallback` - Interface of callback for receive notification of closing Tdlib.

### Method Detail

#### getReceiveCallback

    public ReceiveCallback getReceiveCallback()

Get ReceiveCallback.

Returns:
  This method return ReceiveCallback or "null callback" (a callback that receives data from tdlib but does not perform any operation) if is null.

#### getErrorCallback

    public ErrorCallback getErrorCallback()

Get ErrorCallback.

Returns:
  This method return ErrorCallback or "null callback" (a callback that receives data from tdlib but does not perform any operation) if is null.

#### getCloseCallback

    public CloseCallback getCloseCallback()

Get CloseCallback.

Returns:
  This method return CloseCallback or "null callback" (a callback that receives data from tdlib but does not perform any operation) if is null.