Class<SerializeWorker> workerClass = serializeWorkers.get(outMessage.getVersion());
SerializeWorker worker = workerClass.newInstance();
worker.setOutputStream(out);
worker.setAliasRegistry(aliasRegistry);
worker.setProxyRegistry(proxyRegistry);
serializer = new AMFMessageSerializer(worker);
} catch (Exception e) {
LogWriter.error(getClass(), "Failed to create serializer: " + e, e);
}
return serializer;