serverVersion + "]");
}
} else if (msg instanceof ProfileMessage) {
ProfileMessage pm = (ProfileMessage) msg;
String pn = pm.getProfileName();
ProfileServer p = (ProfileServer) getProfile(mc, pn);
if (p == null) {
p = ProfileServerFactory.createProfile(pn, env);
if (logger.traceOn()) {
logger.trace("connectionOpen",
">>>>> Profile " +
p.getClass().getName() +
" <<<<<");
}
p.initialize(mc, subject);
putProfile(mc, p);
}
p.consumeMessage(pm);
pm = p.produceMessage();
mc.writeMessage(pm);
if (p.isComplete()) {
subject = p.activate();
}
} else {
throw new IOException("Unexpected message: " +
msg.getClass().getName());
}