com.threerings.presents.client
Interface InvocationService<T extends ClientObject>

All Known Subinterfaces:
AdminService, BodyService, BureauService, ChannelSpeakService, ChatService, CrowdPeerService, LocationService, PeerService, RegistrationService, SpeakService, TimeBaseService
All Known Implementing Classes:
AdminMarshaller, BodyMarshaller, BureauMarshaller, ChannelSpeakMarshaller, ChatMarshaller, CrowdPeerMarshaller, InvocationMarshaller, LocationMarshaller, PeerMarshaller, RegistrationMarshaller, SpeakMarshaller, TimeBaseMarshaller

public interface InvocationService<T extends ClientObject>

Serves as the base interface for invocation services. An invocation service can be defined by extending this interface and defining service methods, as well as response listeners (which must extend 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;
 }
 


Nested Class Summary
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.