@Override public void destroy() { super.destroy(); try { dispatcher.stop(); } catch (IOException ex) { log.error("Failed to stop dispatcher", ex); } }
@Override public void init(ConfigurationContext cfgCtx, TransportInDescription transportIn) throws AxisFault { super.init(cfgCtx, transportIn); DatagramDispatcherCallback callback = new DatagramDispatcherCallback() { public void receive(DatagramEndpoint endpoint, byte[] data, int length) { workerPool.execute(new ProcessPacketTask(endpoint, data, length)); } }; try { dispatcher = createDispatcher(callback); } catch (IOException ex) { throw new AxisFault("Unable to create selector", ex); } try { defaultIp = org.apache.axis2.util.Utils.getIpAddress(cfgCtx.getAxisConfiguration()); } catch (SocketException ex) { throw new AxisFault("Unable to determine the host's IP address", ex); } }