Constructor
new EnterpriseEventStream(client, optionsopt)
Parameters:
| Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
client | 
            
            BoxClient | The client to use to get events | ||||||||||||||||||||||||||||||||||||
options | 
            
            Object | 
                
                    <optional> | 
            
            
            Options
                Properties
  | 
        
- Source:
 
Extends
- Readable
 
Members
(private) _client :BoxClient
    The client for making API calls
    Type:
- Source:
 
(private) _options :Object
    Options
    Type:
- Object
 
- Source:
 
(private, nullable) _streamPosition :string
    The current stream position
    Type:
- string
 
- Source:
 
Methods
(private) _read() → {void}
    Implementation of the stream-internal read function.	This is called
by the stream whenever it needs more data, and will not be called again
until data is pushed into the stream.
- Source:
 
Returns:
- Type
 - void
 
(private) _read() → {void}
    Implementation of the stream-internal read function.	This is called
by the stream whenever it needs more data, and will not be called again
until data is pushed into the stream.
- Source:
 
Returns:
- Type
 - void
 
(private) fetchEvents(callback) → {void}
    Fetch the next chunk of events
If there are no events, poll until events are available.
If an error occurs, emit the error but continuing polling as usual.
    Parameters:
| Name | Type | Description | 
|---|---|---|
callback | 
            
            function | Passed the array of events | 
- Source:
 
Returns:
- Type
 - void
 
(private) fetchEvents(callback) → {void}
    Fetch the next chunk of events
If there are no events, poll until events are available.
If an error occurs, emit the error but continuing polling as usual.
    Parameters:
| Name | Type | Description | 
|---|---|---|
callback | 
            
            function | Passed the array of events | 
- Source:
 
Returns:
- Type
 - void
 
getStreamPosition() → (nullable) {number}
- Source:
 
Returns:
    - Returns null if no events have been fetched from Box yet.
- Type
 - number
 
getStreamPosition() → (nullable) {number}
- Source:
 
Returns:
    - Returns null if no events have been fetched from Box yet.
- Type
 - number
 
getStreamState() → {Object}
    Get the stream state.
- Source:
 
Returns:
    - The stream state
- Type
 - Object
 
getStreamState() → {Object}
    Get the stream state.
- Source:
 
Returns:
    - The stream state
- Type
 - Object
 
setStreamState(state) → {void}
    Set the stream state.
    Parameters:
| Name | Type | Description | 
|---|---|---|
state | 
            
            Object | The stream state | 
- Source:
 
Returns:
- Type
 - void
 
setStreamState(state) → {void}
    Set the stream state.
    Parameters:
| Name | Type | Description | 
|---|---|---|
state | 
            
            Object | The stream state | 
- Source:
 
Returns:
- Type
 - void