else if(!SessionPool.pool.containsKey(sessId))
res_builder.setSuccess(false).setException(String.format("invalid session id %d", sessId));
else {
Exchange exchange = new Exchange(client_config.getChannel().getName());
Session sess = SessionPool.getOrCreateConcreteSession(sessId, client_config.getType() == GateTalk.Client.Type.CONSUMER ? GateTalk.Request.Role.SOURCE: GateTalk.Request.Role.SINK);
if(client_config.getAction() == GateTalk.Client.Action.MOUNT) {
sess.addClient(client_config);
res_builder.setSuccess(true).setContext(String.format("exchange %s mounted", exchange.toString()));
}
else if(client_config.getAction() == GateTalk.Client.Action.UNMOUNT) {
sess.removeClient(client_config);
res_builder.setSuccess(true).setContext(String.format("exchange %s unmounted", exchange.getName()));
}
}
}
catch(MistException e) {