}
// set up the admin packet router
admin_pktrtr = new PacketRouter();
AdminDataHandler admin_datahdrl = new
AdminDataHandler(tlist);
// Map message handles -> messages. For the admin service this
// is just like the regular JMS service except we have a specialized
// data handler
try {
admin_pktrtr.addHandler(PacketType.HELLO, hello);
admin_pktrtr.addHandler(PacketType.AUTHENTICATE, authenticate);
admin_pktrtr.addHandler(PacketType.GET_LICENSE, getLicense);
admin_pktrtr.addHandler(PacketType.ADD_CONSUMER, conhdlr);
admin_pktrtr.addHandler(PacketType.DELETE_CONSUMER, conhdlr);
admin_pktrtr.addHandler(PacketType.ADD_PRODUCER, prodhandler);
admin_pktrtr.addHandler(PacketType.START, startstop);
admin_pktrtr.addHandler(PacketType.STOP, startstop);
admin_pktrtr.addHandler(PacketType.ACKNOWLEDGE, ackhandler);
admin_pktrtr.addHandler(PacketType.BROWSE, qbrowserhdlr);
admin_pktrtr.addHandler(PacketType.GOODBYE, goodbye);
admin_pktrtr.addHandler(PacketType.REDELIVER, redeliverhdlr);
admin_pktrtr.addHandler(PacketType.CREATE_DESTINATION, desthandler);
admin_pktrtr.addHandler(PacketType.DESTROY_DESTINATION,
desthandler);
admin_pktrtr.addHandler(PacketType.VERIFY_DESTINATION, vdhandler);
admin_pktrtr.addHandler(PacketType.DELIVER, deliverhdlr);
admin_pktrtr.addHandler(PacketType.START_TRANSACTION, thandler);
admin_pktrtr.addHandler(PacketType.COMMIT_TRANSACTION, thandler);
admin_pktrtr.addHandler(PacketType.ROLLBACK_TRANSACTION, thandler);
admin_pktrtr.addHandler(PacketType.PREPARE_TRANSACTION, thandler);
admin_pktrtr.addHandler(PacketType.END_TRANSACTION, thandler);
admin_pktrtr.addHandler(PacketType.RECOVER_TRANSACTION, thandler);
admin_pktrtr.addHandler(PacketType.SET_CLIENTID, clienthandler);
admin_pktrtr.addHandler(PacketType.GENERATE_UID, genUIDhandler);
admin_pktrtr.addHandler(PacketType.MAP_MESSAGE, admin_datahdrl);
admin_pktrtr.addHandler(PacketType.BYTES_MESSAGE, admin_datahdrl);
admin_pktrtr.addHandler(PacketType.MESSAGE, admin_datahdrl);
admin_pktrtr.addHandler(PacketType.MESSAGE_SET, admin_datahdrl);
admin_pktrtr.addHandler(PacketType.OBJECT_MESSAGE, admin_datahdrl);
admin_pktrtr.addHandler(PacketType.STREAM_MESSAGE, admin_datahdrl);
admin_pktrtr.addHandler(PacketType.TEXT_MESSAGE, admin_datahdrl);
admin_pktrtr.addHandler(PacketType.RESUME_FLOW, flowhdlr);
admin_pktrtr.addHandler(PacketType.FLOW_PAUSED, fphandler);
admin_pktrtr.addHandler(PacketType.CREATE_SESSION,sessionhdlr);
admin_pktrtr.addHandler(PacketType.DELETE_PRODUCER,prodhandler);
admin_pktrtr.addHandler(PacketType.DESTROY_SESSION,sessionhdlr);
} catch (Exception ex) {
logger.logStack(Logger.WARNING,
BrokerResources.E_INTERNAL_BROKER_ERROR,
"adding packet handlers to admin packet router",
ex);
}
// The admin message handlers may need to locate standard packet
// handlers, so we give it a reference to the PacketRouter.
admin_datahdrl.setPacketRouter(admin_pktrtr);
PacketRouter routers[] = {pktrtr, admin_pktrtr};
Globals.setPacketRouters(routers);