com.threerings.presents.data
Class InvocationMarshaller.ListenerMarshaller

java.lang.Object
  extended by com.threerings.presents.data.InvocationMarshaller.ListenerMarshaller
All Implemented Interfaces:
Streamable, InvocationService.InvocationListener
Direct Known Subclasses:
AdminMarshaller.ConfigInfoMarshaller, ChatMarshaller.TellMarshaller, InvocationMarshaller.ConfirmMarshaller, InvocationMarshaller.ResultMarshaller, LocationMarshaller.MoveMarshaller, TimeBaseMarshaller.GotTimeBaseMarshaller
Enclosing class:
InvocationMarshaller

public static class InvocationMarshaller.ListenerMarshaller
extends Object
implements Streamable, InvocationService.InvocationListener

Provides a base from which invocation listener marshallers extend.


Field Summary
protected  String _invId
          On the server, the id of the invocation method.
 int callerOid
          The oid of the invocation service requester.
 InvocationService.InvocationListener listener
          The actual invocation listener associated with this marshalling listener.
 long mapStamp
          The time at which this listener marshaller was registered.
 DObjectManager omgr
          The distributed object manager to use when dispatching proxied responses.
static int REQUEST_FAILED_RSPID
          The method id used to dispatch a requestFailed(java.lang.String) response.
 short requestId
          The request id associated with this listener.
 Transport transport
          The transport mode through which the request was received.
 
Constructor Summary
InvocationMarshaller.ListenerMarshaller()
           
 
Method Summary
 void dispatchResponse(int methodId, Object[] args)
          Called to dispatch an invocation response to our target listener.
protected  void finalize()
           
 void requestFailed(String cause)
          Called to report request failure.
 void setInvocationId(String name)
          Set an identifier for the invocation that this listener is used for, so we can report it if we are never responded-to.
 void setNoResponse()
          Indicates that this listener will not be responded-to, and that this is normal behavior.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REQUEST_FAILED_RSPID

public static final int REQUEST_FAILED_RSPID
The method id used to dispatch a requestFailed(java.lang.String) response.

See Also:
Constant Field Values

requestId

public short requestId
The request id associated with this listener.


callerOid

public transient int callerOid
The oid of the invocation service requester. Only used on the server.


listener

public transient InvocationService.InvocationListener listener
The actual invocation listener associated with this marshalling listener. This is only valid on the client.


mapStamp

public transient long mapStamp
The time at which this listener marshaller was registered. This is only valid on the client.


omgr

public transient DObjectManager omgr
The distributed object manager to use when dispatching proxied responses. This is only valid on the server.


transport

public transient Transport transport
The transport mode through which the request was received. This is only valid on the server.


_invId

protected transient String _invId
On the server, the id of the invocation method.

Constructor Detail

InvocationMarshaller.ListenerMarshaller

public InvocationMarshaller.ListenerMarshaller()
Method Detail

setInvocationId

public void setInvocationId(String name)
Set an identifier for the invocation that this listener is used for, so we can report it if we are never responded-to.


setNoResponse

public void setNoResponse()
Indicates that this listener will not be responded-to, and that this is normal behavior.


requestFailed

public void requestFailed(String cause)
Description copied from interface: InvocationService.InvocationListener
Called to report request failure. If the invocation services system detects failure of any kind, it will report it via this callback. Particular services may also make use of this callback to report failures of their own, or they may opt to define more specific failure callbacks.

Specified by:
requestFailed in interface InvocationService.InvocationListener

dispatchResponse

public void dispatchResponse(int methodId,
                             Object[] args)
Called to dispatch an invocation response to our target listener.


toString

public String toString()
Overrides:
toString in class Object

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable