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.

Status|null
finalStatus()

Return the final status without waiting.

Throwable|null
finalFailure()

Return the final transport or protocol failure without waiting.

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.

void
abandonIfIncomplete()

Release an incomplete native stream without publishing a result.

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 75
__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 88
void attachStream(int $streamId)

Attach the native stream identifier.

Parameters

int $streamId

Return Value

void

at line 100
int|null streamId()

Return the native stream identifier.

Return Value

int|null

at line 110
void onAbandon(Closure $callback)

Register the connection abandonment callback.

Parameters

Closure $callback

Return Value

void

at line 118
void handle(ResponseInterface $response)

Apply one incremental HTTP/2 response event.

Parameters

ResponseInterface $response

Return Value

void

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

Mark a transport or protocol failure.

Parameters

Throwable $failure
bool $abandon

Return Value

void

at line 220
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 243
bool expireIfNeeded()

Expire the call when its monotonic deadline has elapsed.

Return Value

bool

at line 260
void failWithStatus(Status $status)

Mark a local protocol status and abandon the native stream.

Parameters

Status $status

Return Value

void

at line 281
Metadata metadata()

Wait for and return initial response metadata.

Return Value

Metadata

at line 291
Metadata trailers()

Wait for and return final trailing metadata.

Return Value

Metadata

at line 301
Status status()

Wait for and return the final gRPC status.

Return Value

Status

at line 311
Status|null finalStatus()

Return the final status without waiting.

Return Value

Status|null

at line 319
Throwable|null finalFailure()

Return the final transport or protocol failure without waiting.

Return Value

Throwable|null

at line 327
string|null nextMessage()

Wait for and remove the next serialized response message.

Return Value

string|null

at line 344
bool committed()

Determine whether response headers or a message committed the attempt.

Return Value

bool

at line 352
bool trailersOnly()

Determine whether the final response was trailers-only.

Return Value

bool

at line 360
bool isAbandoned()

Determine whether the call has locally abandoned its native stream.

Return Value

bool

at line 368
bool isComplete()

Determine whether the state has a final status or failure.

Return Value

bool

at line 376
void abandonIfIncomplete()

Release an incomplete native stream without publishing a result.

Return Value

void

at line 389
bool hasRetryPushback()

Determine whether retry pushback was present.

Return Value

bool

at line 399
string|array|null retryPushback()

Return the raw retry-pushback value.

Return Value

string|array|null

at line 407
int bufferedMessageCount()

Return the number of buffered response messages.

Return Value

int

at line 415
int bufferedBytes()

Return the buffered response payload bytes.

Return Value

int