Note the actual transport with which events are transmitted.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5794 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Andrzej Kapolka
2009-05-21 18:41:42 +00:00
parent d45b0bdb00
commit 31e9807c05
4 changed files with 43 additions and 0 deletions
@@ -152,6 +152,23 @@ public abstract class DEvent implements Streamable
return _transport;
}
/**
* Notes the actual transport with which the event was transmitted.
*/
public void noteActualTransport (Transport transport)
{
_actualTransport = transport;
}
/**
* Returns the actual transport with which the event was transmitted, or <code>null</code> if
* not yet known.
*/
public Transport getActualTransport ()
{
return _actualTransport;
}
/**
* Events with associated listener interfaces should implement this function and notify the
* supplied listener if it implements their event listening interface. For example, the {@link
@@ -195,6 +212,9 @@ public abstract class DEvent implements Streamable
/** The transport parameters. */
protected transient Transport _transport = Transport.DEFAULT;
/** The actual transport with which the event was transmitted (null if as yet unknown). */
protected transient Transport _actualTransport;
/** Used to differentiate between null meaning we haven't initialized our old value and null
* being the actual old value. */
protected static final Object UNSET_OLD_VALUE = new Object();