/** * INTERNAL: * Send out an announcement that we are here. */ public void announceSession() { rcm.logDebug("sending_announcement", (Object[])null); ServiceAnnouncement outMsg = new ServiceAnnouncement(rcm.getServiceId()); byte[] outBytes = outMsg.toBytes(); try { // Create a packet to send and send it out to everyone listening DatagramPacket sendPacket = new DatagramPacket(outBytes, outBytes.length, InetAddress.getByName(multicastGroupAddress), multicastPort); getCommunicationSocket().send(sendPacket); Object[] args = null; rcm.logInfo("announcement_sent", args); } catch (Exception ex) { // We got an exception. Map it to an RCM exception and call the handler DiscoveryException discoveryEx = DiscoveryException.errorSendingAnnouncement(ex); rcm.handleException(discoveryEx); } }
/** * INTERNAL: * Send out an announcement that we are here. */ public void announceSession() { rcm.logDebug("sending_announcement", (Object[])null); ServiceAnnouncement outMsg = new ServiceAnnouncement(rcm.getServiceId()); byte[] outBytes = outMsg.toBytes(); try { // Create a packet to send and send it out to everyone listening DatagramPacket sendPacket = new DatagramPacket(outBytes, outBytes.length, InetAddress.getByName(multicastGroupAddress), multicastPort); getCommunicationSocket().send(sendPacket); Object[] args = null; rcm.logInfo("announcement_sent", args); } catch (Exception ex) { // We got an exception. Map it to an RCM exception and call the handler DiscoveryException discoveryEx = DiscoveryException.errorSendingAnnouncement(ex); rcm.handleException(discoveryEx); } }
/** * INTERNAL: * Send out an announcement that we are here. */ public void announceSession() { rcm.logDebug("sending_announcement", (Object[])null); ServiceAnnouncement outMsg = new ServiceAnnouncement(rcm.getServiceId()); byte[] outBytes = outMsg.toBytes(); try { // Create a packet to send and send it out to everyone listening DatagramPacket sendPacket = new DatagramPacket(outBytes, outBytes.length, InetAddress.getByName(multicastGroupAddress), multicastPort); getCommunicationSocket().send(sendPacket); Object[] args = null; rcm.logInfo("announcement_sent", args); } catch (Exception ex) { // We got an exception. Map it to an RCM exception and call the handler DiscoveryException discoveryEx = DiscoveryException.errorSendingAnnouncement(ex); rcm.handleException(discoveryEx); } }