public void stop() throws ServiceException { try { server.stop(); } catch (Exception e) { throw new ServiceException(e); } } }
@Override public synchronized void start(final boolean block) throws ServiceException { //This implementaion ignores block if (started == null) { throw new ServiceException("ServiceManager not initialized"); } if (stopped) { throw new ServiceException("ServiceManager has already been stopped"); } started = Boolean.TRUE; for (final Map.Entry<Bundle, List<Service>> entry : serverMap.entrySet()) { for (final Service service : entry.getValue()) { service.start(); } } }
@Override public void start() throws ServiceException { try { server.start(); } catch (Exception e) { throw new ServiceException(e); } }
public void start() throws ServiceException { try { server.start(); } catch (Exception e) { throw new ServiceException(e); } }
@Override public void start() throws ServiceException { try { server.start(); } catch (final Exception e) { throw new ServiceException(e); } }
@Override public void stop() throws ServiceException { try { server.stop(); } catch (final Exception e) { throw new ServiceException(e); } } }
@Override public void stop() throws ServiceException { try { server.stop(); } catch (Exception e) { throw new ServiceException(e); } } }
/** * start the discovery agent * * @throws ServiceException */ @Override public void start() throws ServiceException { try { if (running.compareAndSet(false, true)) { final InetAddress inetAddress = InetAddress.getByName(host); this.address = new InetSocketAddress(inetAddress, port); multicast = new Multicast(tracker); } } catch (final Exception e) { throw new ServiceException(e); } }
/** * Attempts to return at least one socket per valid network interface. * If no valid interface is found then the array will be empty. * * @param multicastAddress A valid multicast address * @param port A valid multicast port * @return MulticastSocket[], may be empty if no valid interfaces exist * @throws Exception On invalid parameters */ public static MulticastSocket[] getSockets(final String multicastAddress, final int port) throws Exception { final InetAddress ia; try { ia = InetAddress.getByName(multicastAddress); } catch (final UnknownHostException e) { throw new ServiceException(multicastAddress + " is not a valid address", e); } if (null == ia || !ia.isMulticastAddress()) { throw new ServiceException(multicastAddress + " is not a valid multicast address"); } return getSockets(ia, port); }
private void addIPAddressPermissions( final LinkedList<IPAddressPermission> permissions, final String hostname) throws ServiceException { try { final InetAddress[] localIps = InetAddress.getAllByName(hostname); for (final InetAddress localIp : localIps) { if (localIp instanceof Inet4Address) { permissions.add(new ExactIPAddressPermission(localIp.getAddress())); } else { permissions.add(new ExactIPv6AddressPermission(localIp.getAddress())); } } } catch (UnknownHostException e) { throw new ServiceException("Could not get " + hostname + " inet address", e); } }
private void addIPAddressPermissions( LinkedList<IPAddressPermission> permissions, String hostname) throws ServiceException { try { InetAddress[] localIps = InetAddress.getAllByName(hostname); for (int i = 0; i < localIps.length; i++) { if (localIps[i] instanceof Inet4Address) { permissions.add(new ExactIPAddressPermission(localIps[i].getAddress())); } else { permissions.add(new ExactIPv6AddressPermission(localIps[i].getAddress())); } } } catch (UnknownHostException e) { throw new ServiceException("Could not get " + hostname + " inet address", e); } }
serverSocket.setSoTimeout(timeout); } catch (Exception e) { throw new ServiceException("Service failed to open socket", e);
property.startsWith(sc_key_database + ".")) { throw new ServiceException("Databases cannot be declared in the hsql.properties. " + "Instead declare a database connection in the openejb.conf file"); throw new ServiceException("Hsql Server can only host 10 database instances");
throw new ServiceException("Service failed to open socket", e);
this.sockets = getSockets(this.multicast, this.port); } catch (final Exception e) { throw new ServiceException("Failed to get Multicast sockets", e);
/** * start the discovery agent * * @throws ServiceException On error */ @Override @Managed public void start() throws ServiceException { try { if (running.compareAndSet(false, true)) { log.info("MultipointDiscoveryAgent Starting"); multipointServer = new MultipointServer(host, discoveryHost, port, tracker, name, debug, roots, reconnectDelay).start(); log.info("MultipointDiscoveryAgent Started"); this.port = multipointServer.getPort(); } } catch (final Exception e) { throw new ServiceException(port + "", e); } }
throw new ServiceException("Stop has already been called on ServiceManager");