throw new IllegalArgumentException("unsupported session type: "
+ type);
try {
SessionAcceptor acceptor = (SessionAcceptor) c.newInstance();
if (MBEAN_SERVER != null)
MBEAN_SERVER.registerMBean(new JmxSessionAcceptor(acceptor),
getObjectName("SessionAcceptor-"
+ ACCEPTOR_COUNTER.incrementAndGet()));
return acceptor;
} catch (Exception e) {
throw new RuntimeException(e);