*
* @param aReferenceInfo Referenceable meta-data.
* @return A Referenceable proxy.
*/
public Object factory(final ReferenceableInfo aReferenceInfo) {
EndPointCallback endPointCB = new EndPointCallback(sender);
endPointCB.setEndPointId(aReferenceInfo.getID());
endPointCB.setOut(out);
endPointCB.setTargets(new NodeInfo[] {aReferenceInfo.getHostingNode()});
Class[] refIntfs = aReferenceInfo.getRefClass();
// Automatically adds the Reference interface to this array of
// interfaces to be implemented by the proxy.
Class[] interfaces = new Class[refIntfs.length + 1];