Java 8 Endpoint - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 Endpoint class.

This code example shows how to use the following methods:getClass, publish
	} 
 
 
	@Override 
	protected void publishEndpoint(Endpoint endpoint, WebService annotation) {
		endpoint.publish(calculateEndpointAddress(endpoint, annotation.serviceName()));
	} 
 
	@Override 
	protected void publishEndpoint(Endpoint endpoint, WebServiceProvider annotation) {
		endpoint.publish(calculateEndpointAddress(endpoint, annotation.serviceName()));
	} 
 
	/** 
	 * Calculate the full endpoint address for the given endpoint. 
	 * @param endpoint the JAX-WS Provider Endpoint object 
	 * @param serviceName the given service name 
	 * @return the full endpoint address 
	 */ 
	protected String calculateEndpointAddress(Endpoint endpoint, String serviceName) {

7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:publish
		super.afterPropertiesSet(); 
	} 
 
	@Override 
	protected void publishEndpoint(Endpoint endpoint, WebService annotation) {
		endpoint.publish(buildHttpContext(endpoint, annotation.serviceName()));
	} 
 
	@Override 
	protected void publishEndpoint(Endpoint endpoint, WebServiceProvider annotation) {
		endpoint.publish(buildHttpContext(endpoint, annotation.serviceName()));
	} 
 
	/** 
	 * Build the HttpContext for the given endpoint. 
	 * @param endpoint the JAX-WS Provider Endpoint object 
	 * @param serviceName the given service name 
	 * @return the fully populated HttpContext 
	 */ 
	protected HttpContext buildHttpContext(Endpoint endpoint, String serviceName) {
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:getEndpointReference, isPublished, stop
    public void testGetEndpointReference() throws Exception {
        SampleEndpoint sample = new SampleEndpoint();
 
        Endpoint ep = Endpoint.publish("test" , sample);
        assertNotNull("The returned Endpoint instance was null", ep);
        assertTrue("The endpoint was not published successfully", ep.isPublished());
         
        Element [] refParams = new Element[0];
        EndpointReference epr = ep.getEndpointReference(refParams);
         
        assertNotNull("The returned EndpointReference instance was null", epr);
         
        ep.stop();
    } 
     
    public void testMetadata() throws Exception {
        SampleEndpoint sample = new SampleEndpoint();
         
        Endpoint ep = Endpoint.create(sample);
        assertTrue("The returned Endpoint instance was null", ep != null);
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:sleep, stop
        endpoint = Endpoint.publish(address, implementor);
    } 
 
    public void stop() { 
        if (endpoint != null) {
            endpoint.stop();
        } 
    } 
 
    public static void main(String args[]) throws Exception {
        Server server = new Server();
        System.out.println("Server ready...");
        server.start();
        Thread.sleep(5 * 60 * 1000);
        System.out.println("Server exiting");
        server.stop();
        System.exit(0);
    } 
 
} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:stop
        this.service = new SimpleService();
        this.endpoint = Endpoint.publish("http://127.0.0.1:9876/HelloService/greeting", service);
    } 
 
    private void stopWebService() { 
        this.endpoint.stop();
    } 
     
    private static KnowledgeBase readKnowledgeBase() throws Exception {
        ProcessBuilderFactory.setProcessBuilderFactoryService(new ProcessBuilderFactoryServiceImpl()); 
        ProcessMarshallerFactory.setProcessMarshallerFactoryService(new ProcessMarshallerFactoryServiceImpl()); 
        ProcessRuntimeFactory.setProcessRuntimeFactoryService(new ProcessRuntimeFactoryServiceImpl()); 
        BPMN2ProcessFactory.setBPMN2ProcessProvider(new BPMN2ProcessProviderImpl()); 
        KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
        kbuilder.add(ResourceFactory.newClassPathResource("BPMN2-JaxWSServiceTask.bpmn2"), ResourceType.BPMN2);
        kbuilder.add(ResourceFactory.newClassPathResource("BPMN2-JaxWSServiceTaskWithErrorBoundaryEvent.bpmn2"), ResourceType.BPMN2);
        kbuilder.add(ResourceFactory.newClassPathResource("BPMN2-TwoWebServiceImports.bpmn"), ResourceType.BPMN2);
        kbuilder.add(ResourceFactory.newClassPathResource("BPMN2-MultipleParamsWebService.bpmn"), ResourceType.BPMN2);
        kbuilder.add(ResourceFactory.newClassPathResource("BPMN2-MultipleIntParamsWebService.bpmn"), ResourceType.BPMN2);
        return kbuilder.newKnowledgeBase();
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:sleep, stop
        endpoint = Endpoint.publish(address, implementor);
    } 
 
    public void stop() { 
        if (endpoint != null) {
            endpoint.stop();
        } 
    } 
 
    public static void main(String args[]) throws Exception {
        Server server = new Server();
        LOG.info("Server ready..."); 
        server.start();
        Thread.sleep(5 * 60 * 1000);
        LOG.info("Server exiting"); 
        server.stop();
        System.exit(0);
    } 
} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:sleep, stop
        // END SNIPPET: e2 
    } 
 
    public void stop() { 
        if (endpointA != null) {
            endpointA.stop();
        } 
        if (endpointB != null) {
            endpointB.stop();
        } 
    } 
     
 
    public static void main(String args[]) throws Exception {
        Server server = new Server();
        server.prepare();
        server.start();
         
        System.out.println("Server ready...");
 

6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:stop
public class CXFGreeterEnrichTest extends AbstractCXFGreeterRouterTest { 
    protected static Endpoint endpoint;
    @AfterClass 
    public static void stopService() { 
        if (endpoint != null) {
            endpoint.stop();
        } 
    } 
 
 
    @BeforeClass 
    public static void startService() { 
        Object implementor = new GreeterImpl(); 
        String address = "http://localhost:" + getPort1() + "/CXFGreeterEnrichTest/SoapContext/SoapPort"; 
        endpoint = Endpoint.publish(address, implementor); 
    } 
 
    protected ClassPathXmlApplicationContext createApplicationContext() { 
        return new ClassPathXmlApplicationContext("org/apache/camel/component/cxf/GreeterEnrichRouterContext.xml"); 
    } 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:publish, setProperties
        ep = Endpoint.create(implementor);
        Map<String, Object> props = new HashMap<String, Object>(2);
        props.put(Endpoint.WSDL_SERVICE, new QName("http://apache.org/hello_world_doc_lit_bare", 
                                                   "SOAPService")); 
        props.put(Endpoint.WSDL_PORT, new QName("http://apache.org/hello_world_doc_lit_bare", "SoapPort"));
        ep.setProperties(props);
        ep.publish(address);
    } 
 
    public void tearDown() { 
        ep.stop();
        ep = null;
    } 
 
    public static void main(String[] args) {
        try { 
            Server s = new Server();
            s.start();
        } catch (Exception ex) {
            ex.printStackTrace();
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:stop
        endpoint = Endpoint.publish(url, service);
    } 
 
    public void stop() throws Exception {
        if (endpoint != null) {
            endpoint.stop();
        } 
    } 
 
    public String getUrl() {
        return url;
    } 
 
    public void setUrl(String url) {
        this.url = url;
    } 
 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 Endpoint Methods: