@Override public String getSocketBindingName() { return binding.getName(); }
private String getSocketBindingName(String name) { SocketBinding socketBinding = this.socketBindings.get(name); return (socketBinding != null) ? socketBinding.getName() : name; }
protected void unregisterBinding() { final SocketBinding binding = this.binding.getValue(); binding.getSocketBindings().getNamedRegistry().unregisterBinding(binding.getName()); }
@Override public void stop(StopContext context) { if (IIOPLogger.ROOT_LOGGER.isDebugEnabled()) { IIOPLogger.ROOT_LOGGER.debugf("Stopping service %s", context.getController().getName().getCanonicalName()); } final SocketBinding socketBinding = iiopSocketBindingInjector.getOptionalValue(); final SocketBinding sslSocketBinding = iiopSSLSocketBindingInjector.getOptionalValue(); if (socketBinding != null) { socketBinding.getSocketBindings().getNamedRegistry().unregisterBinding(socketBinding.getName()); } if (sslSocketBinding != null) { sslSocketBinding.getSocketBindings().getNamedRegistry().unregisterBinding(sslSocketBinding.getName()); } // stop the ORB asynchronously. final ORBDestroyer destroyer = new ORBDestroyer(this.orb, context); try { executorInjector.getValue().execute(destroyer); } catch (RejectedExecutionException e) { destroyer.run(); } finally { context.asynchronous(); } }
@Override public String getSocketBindingName() { return socketBinding.getName(); }
@Override public String getSocketBindingName() { return binding.getName(); }
@Override public String getSocketBindingName() { return binding.getName(); }
@Override public String getSocketBindingName() { return socketBinding.getName(); }
@Override public String getSocketBindingName() { return socketBinding.getName(); }
private String getSocketBindingName(String name) { SocketBinding socketBinding = this.socketBindings.get(name); return (socketBinding != null) ? socketBinding.getName() : name; }
public synchronized void unadvertise(String appName, SocketBinding binding) { Registration registration = this.registrations.remove(appName + ":" + binding.getName()); if (registration != null) { try { this.dispatcher.submitOnCluster(new UnadvertiseCommand(registration)); } catch (Exception e) { e.printStackTrace(); } } }
public synchronized void unadvertise(String appName, SocketBinding binding) throws Exception { Registration registration = this.registrations.remove(appName + ":" + binding.getName()); if (registration != null) { this.dispatcher.executeOnGroup(new UnadvertiseCommand(registration)); } }
private static void configureMulticastSocket(Introspector introspector, org.jgroups.conf.ProtocolConfiguration config, String addressProperty, String portProperty, SocketBinding binding) { try { InetSocketAddress mcastSocketAddress = binding.getMulticastSocketAddress(); setSocketBindingProperty(introspector, config, addressProperty, mcastSocketAddress.getAddress().getHostAddress()); setSocketBindingProperty(introspector, config, portProperty, String.valueOf(mcastSocketAddress.getPort())); } catch (IllegalStateException e) { ROOT_LOGGER.couldNotSetAddressAndPortNoMulticastSocket(e, config.getProtocolName(), addressProperty, config.getProtocolName(), portProperty, binding.getName()); } }
private void configureMulticastSocket(ProtocolConfiguration protocol, org.jgroups.conf.ProtocolConfiguration config, String addressProperty, String portProperty, SocketBinding binding) { try { InetSocketAddress mcastSocketAddress = binding.getMulticastSocketAddress(); this.setPropertyNoOverride(protocol, config, addressProperty, mcastSocketAddress.getAddress().getHostAddress()); this.setPropertyNoOverride(protocol, config, portProperty, String.valueOf(mcastSocketAddress.getPort())); } catch (IllegalStateException e) { ROOT_LOGGER.couldNotSetAddressAndPortNoMulticastSocket(e, config.getProtocolName(), addressProperty, config.getProtocolName(), portProperty, binding.getName()); } }
public synchronized void stop(final StopContext context) { try { if (server != null) { for (Supplier<SocketBinding> binding : socketBindings.values()) { if (binding != null) { binding.get().getSocketBindings().getNamedRegistry().unregisterBinding(binding.get().getName()); } } for (Supplier<SocketBinding> binding : groupBindings.values()) { if (binding != null) { binding.get().getSocketBindings().getNamedRegistry().unregisterBinding(binding.get().getName()); } } // the server is actually stopped by the JMS Service } pathConfig.closeCallbacks(pathManager.get()); } catch (Exception e) { throw MessagingLogger.ROOT_LOGGER.failedToShutdownServer(e, "Artemis"); } }
public synchronized void advertise(String name, SocketBinding binding, String... tags) { Registration registration = new Registration(sourceKey(this.node), name, binding.getAddress().getHostAddress(), binding.getAbsolutePort(), tags); this.registrations.put(name + ":" + binding.getName(), registration); advertise(registration); }
public synchronized void advertise(String name, SocketBinding binding, String... tags) throws Exception { Registration registration = new Registration(sourceKey(this.node), name, binding.getAddress().getHostAddress(), binding.getAbsolutePort(), tags); this.registrations.put(name + ":" + binding.getName(), registration); advertise(registration); }
private URL getConnectionURL() throws StartException { SocketBinding socketBinding = injectedHttpSocketBinding.getValue(); InetAddress address = socketBinding.getNetworkInterfaceBinding().getAddress(); URL result; try { String hostAddress = NetworkUtils.formatPossibleIpv6Address(address.getHostAddress()); result = new URL(socketBinding.getName() + "://" + hostAddress + ":" + socketBinding.getPort()); } catch (MalformedURLException ex) { throw new StartException(ex); } return result; }
protected void unregisterBinding() { final SocketBinding binding = this.binding.getValue(); binding.getSocketBindings().getNamedRegistry().unregisterBinding(binding.getName()); }
protected void unregisterBinding() { final SocketBinding binding = this.binding.getValue(); binding.getSocketBindings().getNamedRegistry().unregisterBinding(binding.getName()); }