public interface InvocationService<T extends ClientObject>
InvocationService.InvocationListener). For example:
public interface LocationService extends InvocationService<ClientObject>
{
// Used to communicate responses to moveTo() requests.
public interface MoveListener extends InvocationListener
{
// Called in response to a successful moveTo() request.
void moveSucceeded (PlaceConfig config);
}
// Requests that this client's body be moved to the specified location.
//
// @param placeId the object id of the place object to which the body should be moved.
// @param listener the listener that will be informed of success or failure.
void moveTo (int placeId, MoveListener listener);
}
From this interface, a LocationProvider interface will be generated which should be
implemented by whatever server entity that will actually provide the server side of this
invocation service. That provider interface would look like the following:
public interface LocationProvider extends InvocationProvider
{
// Requests that this client's body be moved to the specified location.
//
// @param caller the client object of the client that invoked this remotely callable method.
// @param placeId the object id of the place object to which the body should be moved.
// @param listener the listener that should be informed of success or failure.
void moveTo (ClientObject caller, int placeId, MoveListener listener)
throws InvocationException;
}
| Modifier and Type | Interface and Description |
|---|---|
static interface |
InvocationService.ConfirmListener
Extends the
InvocationService.InvocationListener with a basic success callback. |
static interface |
InvocationService.InvocationListener
Invocation service methods that require a response should take a listener argument that can
be notified of request success or failure.
|
static interface |
InvocationService.ResultListener
Extends the
InvocationService.InvocationListener with a basic success callback that delivers a result
object. |
Copyright © 2015. All rights reserved.