package org.briarproject.api.android; /** * Manages mappings between object references and serialisable handles. This * enables references to be passed between Android UI objects that belong to * the same process but can only communicate via serialisation. */ public interface ReferenceManager { /** * Returns the object with the given handle, or null if no mapping exists * for the handle. */ T getReference(long handle, Class c); /** * Creates a mapping between the given reference and a handle, and returns * the handle. */ long putReference(T reference, Class c); /** * Removes and returns the object with the given handle, or returns null * if no mapping exists for the handle. */ T removeReference(long handle, Class c); }