Invocation Mode

3 min read

3 min read

3 min read

3 min read

3 min read

3 min read

3 min read

3 min read

3 min read

Each proxy has an invocation mode that configures its invocation behavior. You can choose between the following invocation modes:

Invocation modeStringified proxy optionMeaning
twoway (the default)
-t
The invocation sends a request and receives a reply.
oneway
-o
The invocation sends a request and receives no reply.
batch oneway
-O
The invocation queues the request, and Ice sends the queued requests in a batch; there is no reply.
datagram
-d
Like oneway, for proxies with UDP endpoints.
batch datagram
-D
Like batch oneway, for proxies with UDP endpoints.

For example, if you create a proxy from the stringified proxy greeter:tcp -h localhost -p 4061, you’ll get a two-way proxy, just like if you created this proxy from greeter -t:tcp -h localhost -p 4061. And if you create a proxy from greeter -O:tcp -h localhost -p 4061, you’ll get a batch one-way proxy.

You can also set the invocation method on a proxy programmatically using a proxy factory method: ice_twoway, ice_oneway, ice_batchOneway, etc.

These invocation modes are only applicable to proxies with non-UDP endpoints, such as tcp, ssl, wss.

If you select oneway or batch oneway for a proxy with a UDP endpoint, you won’t get an error - you’ll just make this proxy unusable. If you later make an invocation with such a proxy, you’ll receive a NoEndpointException.

These invocation modes are only applicable to proxies with UDP endpoints.

If you select datagram or batch datagram for a proxy with a TCP endpoint, you won’t get an error - you’ll just make this proxy unusable. If you later make an invocation with such a proxy, you’ll receive a NoEndpointException.

In theory, the datagram and batch datagram invocation modes are applicable to any datagram transport. In practice, Ice provides a single datagram transport, UDP, and we don’t anticipate ever adding another datagram transport.