@Override public boolean isPublished() { return delegate.isPublished(); }
public boolean hasListener() { if (listenerEndpoint==null) return false; return listenerEndpoint.isPublished(); }
public void unregisterEndpoint(Endpoint ep) { if (ep.isPublished()) { LOG.warning("ENDPOINT_ACTIVE_MSG"); } endpoints.remove(ep); }
@Override public String getStatus() { if (error != null) return "Error: " + error; if (!isConnected()) return "not connected"; return endpoint.isPublished() ? "published" : "not published"; }
public String getStatus() { if (error != null) return "Error: " + error; if (!isConnected()) return "not connected"; return endpoint.isPublished() ? "published" : "not published"; }
private synchronized void shutdown() { if (ep != null && !ep.isPublished()) { log.fatal("Hey, someone should tell the developer to call SubscriptionCallbackListern.stop(...) before ending the program. Stopping endpoint at " + callback); unregisterAllCallbacks(); ep.stop(); ep = null; callback = null; } }
public void shutdown() { for (Endpoint ep : endpoints) { if (ep.isPublished()) { ep.stop(); bus.sendEvent(new ComponentRemovedEvent((EndpointImpl)ep)); } } endpoints.clear(); }
@Override public void publishEndpoints() { for (WSEndpointDescriptor desc : regitry.getContributions()) { try { stopIfExists(desc.name); Endpoint ep = desc.toEndpoint(); ep.publish(desc.address); desc.configurePostPublishing(ep); if (ep.isPublished()) { endpoints.put(desc.name, ep); } else { log.warn("Endpoint publishing is failing: " + desc.name); } } catch (IOException | IllegalAccessException | InstantiationException e) { log.warn("Unable to register endpoint: " + desc.name, e); } } }
/** * Endpoints within a EndpointContext get the same container. */ private Container getContainer() { if (endpointContext != null) { if (endpointContext instanceof Component) { Container c = ((Component) endpointContext).getSPI(Container.class); if (c != null) return c; } for(Endpoint e : endpointContext.getEndpoints()) { if (e.isPublished() && e != this) { return ((EndpointImpl)e).container; } } } return new ServerContainer(); }
/** * Endpoints within a EndpointContext get the same container. */ private Container getContainer() { if (endpointContext != null) { if (endpointContext instanceof Component) { Container c = ((Component) endpointContext).getSPI(Container.class); if (c != null) return c; } for(Endpoint e : endpointContext.getEndpoints()) { if (e.isPublished() && e != this) { return ((EndpointImpl)e).container; } } } return new ServerContainer(); }
/** * Endpoints within a EndpointContext get the same container. */ private Container getContainer() { if (endpointContext != null) { if (endpointContext instanceof Component) { Container c = ((Component) endpointContext).getSPI(Container.class); if (c != null) return c; } for(Endpoint e : endpointContext.getEndpoints()) { if (e.isPublished() && e != this) { return ((EndpointImpl)e).container; } } } return new ServerContainer(); }
@Override public void tearDown() throws Exception { // Unpublish the SOAP Web Service if (endpoint != null) { endpoint.stop(); assertFalse(endpoint.isPublished()); } service = null; portMockAdapter = null; }
if (ep != null && ep.isPublished()) { throw new ServiceAlreadyStartedException(); while ((ep == null || !ep.isPublished()) && attempts > 0) { try { ep = Endpoint.publish(endpoint, instance); if (ep == null || !ep.isPublished()) { log.warn("Unable to start callback endpoint, aborting"); throw new SecurityException("unable to start endpoint, view previous errors for reason");
if (ep != null && ep.isPublished()) { log.warn("Stopping jUDDI Subscription callback endpoint at " + callback); ep.stop(); if (ep.isPublished()) { log.fatal("Unable to stop the endpoint. the port may be locked until this java process terminates");
private HttpAdapter getAdapter(WSEndpoint endpoint, String urlPattern) { HttpAdapterList adapterList = null; if (endpointContext != null) { if (endpointContext instanceof Component) { adapterList = ((Component) endpointContext).getSPI(HttpAdapterList.class); } if (adapterList == null) { for(Endpoint e : endpointContext.getEndpoints()) { if (e.isPublished() && e != this) { adapterList = ((HttpEndpoint)(((EndpointImpl)e).actualEndpoint)).getAdapterOwner(); assert adapterList != null; break; } } } } if (adapterList == null) { adapterList = new ServerAdapterList(); } return adapterList.createAdapter("", urlPattern, endpoint); }
private HttpAdapter getAdapter(WSEndpoint endpoint, String urlPattern) { HttpAdapterList adapterList = null; if (endpointContext != null) { if (endpointContext instanceof Component) { adapterList = ((Component) endpointContext).getSPI(HttpAdapterList.class); } if (adapterList == null) { for(Endpoint e : endpointContext.getEndpoints()) { if (e.isPublished() && e != this) { adapterList = ((HttpEndpoint)(((EndpointImpl)e).actualEndpoint)).getAdapterOwner(); assert adapterList != null; break; } } } } if (adapterList == null) { adapterList = new ServerAdapterList(); } return adapterList.createAdapter("", urlPattern, endpoint); }
protected void publish() throws Exception { int portNumber = FreePortFinder.findFreePort(28080, FreePortFinder.MAX_PORT_NUMBER); URL endpointAddress = new URL("http://localhost:" + portNumber + "/services/" + portName); logger.info("Endpoint address: {}", endpointAddress); portMockAdapter = portAdapterClass.newInstance(); portMockAdapter.setEndpointAddress(endpointAddress); // Publish the SOAP Web Service endpoint = Endpoint.publish(endpointAddress.toString(), portMockAdapter); assertTrue(endpoint.isPublished()); assertEquals("http://schemas.xmlsoap.org/wsdl/soap/http", endpoint.getBinding().getBindingID()); }
private HttpAdapter getAdapter(WSEndpoint endpoint, String urlPattern) { HttpAdapterList adapterList = null; if (endpointContext != null) { if (endpointContext instanceof Component) { adapterList = ((Component) endpointContext).getSPI(HttpAdapterList.class); } if (adapterList == null) { for(Endpoint e : endpointContext.getEndpoints()) { if (e.isPublished() && e != this) { adapterList = ((HttpEndpoint)(((EndpointImpl)e).actualEndpoint)).getAdapterOwner(); assert adapterList != null; break; } } } } if (adapterList == null) { adapterList = new ServerAdapterList(); } return adapterList.createAdapter("", urlPattern, endpoint); }