Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.

public static final class GrpcChannel.Call<Q, R>

  1. Object
  2. GrpcChannel.Call

ImplementsIterator<R>

One call in progress: send requests, end them, read responses.

Type parameters

<Q>
request type
<R>
response type

Methods

public void send(Q request)Sends one request message.
public void complete()Ends the request stream.
public void close()Cancels the call when it has not ended, and releases it.
public Map<String, String> getHeaders()
public Map<String, String> getTrailers()
public boolean hasNext()Returns whether there are more elements to iterate, i.e. whether the iterator is positioned in front of an element.
public R next()Returns the next object in the iteration, i.e. returns the element in front of the iterator and advances the iterator by one position.
public void remove()Removes the last element next answered from the collection being iterated, which this iterator does not support unless it says otherwise.

Inherited methods

Method details

send

public void send(Q request)
Sends one request message.

Parameters

request Q
the message

complete

public void complete()
Ends the request stream.

close

public void close()
Cancels the call when it has not ended, and releases it.

getHeaders

public Map<String, String> getHeaders()

Returns

the response headers, waiting for them

getTrailers

public Map<String, String> getTrailers()

Returns

the trailers, once the responses were read to their end; null before

hasNext

public boolean hasNext()
Returns whether there are more elements to iterate, i.e. whether the iterator is positioned in front of an element.

Returns

true if there are more elements, false otherwise.

See also

next

public R next()
Returns the next object in the iteration, i.e. returns the element in front of the iterator and advances the iterator by one position.

Returns

the next object.

Throws

NoSuchElementException
if there are no more elements.

See also

remove

public void remove()
Removes the last element next answered from the collection being iterated, which this iterator does not support unless it says otherwise.

Throws

UnsupportedOperationException
when removing is not supported
IllegalStateException
when next has not been called, or remove has already been called after the last call to next