PHP Class DataSift_StreamConsumer_HTTP

Author: Stuart Dallas ([email protected])
Inheritance: extends DataSift_StreamConsumer
Show file Open project: datasift/datasift-php

Protected Properties

Property Type Description
$_auto_reconnect Automatically reconnect if the connection is dropped
$_connect_timeout Connect timeout in seconds
$_max_line_length Max allowable line size from the stream
$_read_timeout Read timeout in seconds
$_stream_timeout Stream timeout in seconds

Public Methods

Method Description
__construct ( DataSift_User $user, mixed $definition, mixed $eventHandler ) Constructor.
setAutoReconnect ( boolean $reconnect ) : void Set whether to automatically reconnect to the stream if the connection is dropped.

Protected Methods

Method Description
onStart ( ) : void SetUp

Private Methods

Method Description
connect ( ) : void Connect to the DataSift HTTP stream
disconnect ( ) : void Disconnect from the DataSift stream
reconnect ( ) : void Reconnect to the DataSift stream

Method Details

__construct() public method

Constructor.
See also: DataSift_StreamConsumer::__construct
public __construct ( DataSift_User $user, mixed $definition, mixed $eventHandler )
$user DataSift_User The authenticated user
$definition mixed CSDL string, Definition object, or array of hashes
$eventHandler mixed An object that implements IStreamConsumerEventHandler

onStart() protected method

SetUp
protected onStart ( ) : void
return void

setAutoReconnect() public method

Set whether to automatically reconnect to the stream if the connection is dropped.
public setAutoReconnect ( boolean $reconnect ) : void
$reconnect boolean True to enable automatic reconnection
return void

Property Details

$_auto_reconnect protected property

Automatically reconnect if the connection is dropped
protected $_auto_reconnect

$_connect_timeout protected property

Connect timeout in seconds
protected $_connect_timeout

$_max_line_length protected property

Max allowable line size from the stream
protected $_max_line_length

$_read_timeout protected property

Read timeout in seconds
protected $_read_timeout

$_stream_timeout protected property

Stream timeout in seconds
protected $_stream_timeout