final class StreamState

internal  
 

Methods

__construct(Deadline $deadline, int $maxReceiveMessageSize, int $maxMetadataSize, int $maxBufferedMessages, int $maxBufferedBytes)

No description

void
attachStream(int $streamId)

Attach the native stream identifier.

int|null
streamId()

Return the native stream identifier.

void
onAbandon(Closure $callback)

Register the connection abandonment callback.

void
handle(ResponseInterface $response)

Apply one incremental HTTP/2 response event.

void
fail(Throwable $failure, bool $abandon = false)

Mark a transport or protocol failure.

void
discardAndFail(Throwable $failure)

Discard an untrusted response and replace it with a terminal failure.

bool
expireIfNeeded()

Expire the call when its monotonic deadline has elapsed.

void
failWithStatus(Status $status)

Mark a local protocol status and abandon the native stream.

metadata()

Wait for and return initial response metadata.

trailers()

Wait for and return final trailing metadata.

status()

Wait for and return the final gRPC status.

string|null
nextMessage()

Wait for and remove the next serialized response message.

bool
committed()

Determine whether response headers or a message committed the attempt.

bool
trailersOnly()

Determine whether the final response was trailers-only.

bool
isAbandoned()

Determine whether the call has locally abandoned its native stream.

bool
isComplete()

Determine whether the state has a final status or failure.

bool
hasRetryPushback()

Determine whether retry pushback was present.

string|array|null
retryPushback()

Return the raw retry-pushback value.

int
bufferedMessageCount()

Return the number of buffered response messages.

int
bufferedBytes()

Return the buffered response payload bytes.

Details

at line 74
__construct(Deadline $deadline, int $maxReceiveMessageSize, int $maxMetadataSize, int $maxBufferedMessages, int $maxBufferedBytes)

No description

Parameters

Deadline $deadline
int $maxReceiveMessageSize
int $maxMetadataSize
int $maxBufferedMessages
int $maxBufferedBytes

at line 87
void attachStream(int $streamId)

Attach the native stream identifier.

Parameters

int $streamId

Return Value

void

at line 99
int|null streamId()

Return the native stream identifier.

Return Value

int|null

at line 109
void onAbandon(Closure $callback)

Register the connection abandonment callback.

Parameters

Closure $callback

Return Value

void

at line 117
void handle(ResponseInterface $response)

Apply one incremental HTTP/2 response event.

Parameters

ResponseInterface $response

Return Value

void

at line 193
void fail(Throwable $failure, bool $abandon = false)

Mark a transport or protocol failure.

Parameters

Throwable $failure
bool $abandon

Return Value

void

at line 219
void discardAndFail(Throwable $failure)

internal  
 

Discard an untrusted response and replace it with a terminal failure.

This is only valid while terminating a connection whose pending stream was attached to a different identifier than the native send operation returned.

Parameters

Throwable $failure

Return Value

void

at line 242
bool expireIfNeeded()

Expire the call when its monotonic deadline has elapsed.

Return Value

bool

at line 259
void failWithStatus(Status $status)

Mark a local protocol status and abandon the native stream.

Parameters

Status $status

Return Value

void

at line 280
Metadata metadata()

Wait for and return initial response metadata.

Return Value

Metadata

at line 290
Metadata trailers()

Wait for and return final trailing metadata.

Return Value

Metadata

at line 300
Status status()

Wait for and return the final gRPC status.

Return Value

Status

at line 310
string|null nextMessage()

Wait for and remove the next serialized response message.

Return Value

string|null

at line 327
bool committed()

Determine whether response headers or a message committed the attempt.

Return Value

bool

at line 335
bool trailersOnly()

Determine whether the final response was trailers-only.

Return Value

bool

at line 343
bool isAbandoned()

Determine whether the call has locally abandoned its native stream.

Return Value

bool

at line 351
bool isComplete()

Determine whether the state has a final status or failure.

Return Value

bool

at line 359
bool hasRetryPushback()

Determine whether retry pushback was present.

Return Value

bool

at line 369
string|array|null retryPushback()

Return the raw retry-pushback value.

Return Value

string|array|null

at line 377
int bufferedMessageCount()

Return the number of buffered response messages.

Return Value

int

at line 385
int bufferedBytes()

Return the buffered response payload bytes.

Return Value

int