Oracle Coherence for C++ API
Release 3.6.0.0
E15728-01

- Main Page
- Namespaces
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Invocable Class Reference

`#include <coherence/net/Invocable.hpp>`

Inherits Runnable.

Inherited by AbstractInvocable `[virtual]`.

List of all members.

## Detailed Description

The Invocable object is a cluster-portable object that can be invoked on any set of remote members and each can optionally register a return value for the invocation.

When an Invocable object is received for execution, the order of execution is:

- the Invocable object is deserialized by the InvocationService;
- the InvocationService provides a reference to itself to the Invocable object by calling the init method;
- the InvocationService invokes the Invocable object by calling the run method;
- if the InvocationService is responsible for returning a value from the invocation, it obtains the value by calling the getResult method.

Author:
  jh 2007.12.21

## Public Types
typedef spec::Handle | Handle
| Invocable Handle definition.
typedef spec::View | View
| Invocable View definition.
typedef spec::Holder | Holder
| Invocable Holder definition.
typedef TypedHandle < InvocationService > | InvocationServiceHandle
| InvocationService Handle definition.
typedef TypedHandle < const InvocationService > | InvocationServiceView
| InvocationService View definition.
## Public Member Functions
virtual void | init (InvocationServiceHandle hService)=0
| Called by the InvocationService exactly once on this Invocable object as part of its initialization.
virtual Object::Holder | getResult () const =0
| Determine the result from the invocation of this object.

## Member Function Documentation

virtual void init | ( | InvocationServiceHandle | hService | ) | `[pure virtual]`

Called by the InvocationService exactly once on this Invocable object as part of its initialization.

Note: implementations of the Invocable interface that store the service reference must do so only in a transient field.

Parameters:

  | hService | the containing InvocationService

virtual Object::Holder getResult | ( |  | ) | const `[pure virtual]`

Determine the result from the invocation of this object.

This method is called by the InvocationService after the run() method returns.

Returns:
  the invocation result, if any

Implemented in AbstractInvocable.

The documentation for this class was generated from the following file:

- coherence/net/Invocable.hpp

Copyright © 2000, 2010, Oracle and/or its affiliates. All rights reserved.