Set<ObjectName> epNames = epRegistry.getEndpoints(); Endpoint ep = epRegistry.getEndpoint(oname);
/** * Get the serviceURL as string for a given serviceID. */ public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { String pcLink = req.getParameter("pcLink"); if (pcLink == null) throw NativeMessages.MESSAGES.illegalNullArgument("pcLink"); Endpoint endpoint = epRegistry.resolve( new PortComponentResolver(pcLink) ); if (endpoint == null) throw NativeMessages.MESSAGES.cannotResolvePortComponentLink(pcLink); res.setContentType("text/plain"); PrintWriter out = res.getWriter(); ServerEndpointMetaData sepMetaData = endpoint.getAttachment(ServerEndpointMetaData.class); String endpointAddress = sepMetaData.getEndpointAddress(); out.println(endpointAddress); if (log.isDebugEnabled()) log.debug("Resolved " + pcLink + " to: " + endpointAddress); out.close(); } }
/** Initialize the service endpoint */ private static Endpoint initServiceEndpoint(EndpointRegistry epRegistry, String contextPath, String servletName) { if (contextPath.startsWith("/")) contextPath = contextPath.substring(1); final ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath + "," + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName); Endpoint endpoint = epRegistry.getEndpoint(oname); if (endpoint == null) { throw Messages.MESSAGES.cannotObtainEndpoint(oname); } //Inject the EJB and JNDI resources if possible injectServiceAndHandlerResources(endpoint); return endpoint; }
public void start(Deployment dep) { SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider(); if (registry == null) registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry(); for (Endpoint ep : dep.getService().getEndpoints()) { registry.register(ep); } }
public void stop(Deployment dep) { SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider(); if (registry == null) registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry(); for (Endpoint ep : dep.getService().getEndpoints()) { registry.unregister(ep); } }
final Endpoint endpoint = registry.getEndpoint(endpointObjectName);
@Override public void start(final StartContext context) throws StartException { ROOT_LOGGER.starting(name); endpoint.setSecurityDomainContext(new SecurityDomainContextAdaptor(securityDomainContextValue.getValue())); if (hasWebservicesMD(endpoint)) { //basically JAX-RPC deployments require the PortComponentLinkServlet to be available pclWebAppControllerValue.getValue().incrementUsers(); } final List<RecordProcessor> processors = endpoint.getRecordProcessors(); for (final RecordProcessor processor : processors) { registerRecordProcessor(processor, endpoint); } endpointRegistryValue.getValue().register(endpoint); }
@Override public void stop(final StopContext context) { ROOT_LOGGER.stopping(name); endpoint.setSecurityDomainContext(null); if (hasWebservicesMD(endpoint)) { pclWebAppControllerValue.getValue().decrementUsers(); } endpointRegistryValue.getValue().unregister(endpoint); final List<RecordProcessor> processors = endpoint.getRecordProcessors(); for (final RecordProcessor processor : processors) { unregisterRecordProcessor(processor, endpoint); } }
/** * Initialize the service endpoint * @param contextPath context path * @param servletName servlet name */ private void initEndpoint(String contextPath, String servletName) { final EndpointResolver resolver = newEndpointResolver(contextPath, servletName); this.endpoint = epRegistry.resolve(resolver); if (this.endpoint == null) { ObjectName oname = ObjectNameFactory.create(Endpoint.SEPID_DOMAIN + ":" + Endpoint.SEPID_PROPERTY_CONTEXT + "=" + contextPath + "," + Endpoint.SEPID_PROPERTY_ENDPOINT + "=" + servletName ); throw NativeMessages.MESSAGES.cannotObtainEndpoint(oname); } }
Endpoint endpoint = epRegistry.resolve( new PortComponentResolver(pcLink) ); if (endpoint == null) throw MESSAGES.cannotResolvePortComponentLink(pcLink);