* <p>
* XXX: Merge this with AbstsractRequestContext's implementation
*/
public Splittable getSerializedProxyId(SimpleProxyId<?> stableId) {
AutoBean<IdMessage> bean = MessageFactoryHolder.FACTORY.id();
IdMessage ref = bean.as();
ref.setTypeToken(service.resolveTypeToken(stableId.getProxyClass()));
if (stableId.isSynthetic()) {
ref.setStrength(Strength.SYNTHETIC);
ref.setSyntheticId(stableId.getSyntheticId());
} else if (stableId.isEphemeral()) {
ref.setStrength(Strength.EPHEMERAL);
ref.setClientId(stableId.getClientId());
} else {
ref.setServerId(SimpleRequestProcessor.toBase64(stableId.getServerId()));
}
return AutoBeanCodex.encode(bean);
}