Package org.openquark.cal.internal.runtime.lecc

Examples of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_11$_1


            InterruptedException {
        sl.register(endpoint(), EasyMock.eq(true));
        EasyMock.expectLastCall().andStubThrow(new ServiceLocatorException("test"));

        replayAll();
        RegisterEndpointRequest req = new RegisterEndpointRequest();
        EntryType entryType = new EntryType();
        entryType.setKey("test");
        entryType.getValue().add("test");
        req.getEntryType().add(entryType);
        req.setEndpointURL(ENDPOINTURL);
        req.setServiceName(SERVICE_NAME.toString());
        lps.registerEndpoint(req);
    }
View Full Code Here


            InterruptedException {
        sl.register(endpoint(), EasyMock.eq(true));
        EasyMock.expectLastCall().andStubThrow(new InterruptedException("test"));

        replayAll();
        RegisterEndpointRequest req = new RegisterEndpointRequest();
        EntryType entryType = new EntryType();
        entryType.setKey("test");
        entryType.getValue().add("test");
        req.getEntryType().add(entryType);
        req.setEndpointURL(ENDPOINTURL);
        req.setServiceName(SERVICE_NAME.toString());
        lps.registerEndpoint(req);
    }
View Full Code Here

            InterruptedException {
        sl.register(endpoint(), EasyMock.eq(true));
        EasyMock.expectLastCall();

        replayAll();
        RegisterEndpointRequest req = new RegisterEndpointRequest();
        req.setEndpointURL(ENDPOINTURL);
        req.setServiceName(SERVICE_NAME.toString());
        req.setBinding(BindingType.JAXRS);
        req.setTransport(TransportType.HTTPS);
        lps.registerEndpoint(req);
    }
View Full Code Here

  private void registerExample(LocatorService client, String service, String endpoint) {
    System.out.println("------------------------------");
    System.out.println("Register service with endpoint");
    System.out.println("ServiceName: ".concat(service));
    System.out.println("EndpointURL: ".concat(endpoint));
    RegisterEndpointRequest registerEndpointRequest = new RegisterEndpointRequest();
    registerEndpointRequest.setBinding(BindingType.JAXRS);
    registerEndpointRequest.setTransport(TransportType.HTTPS);
    registerEndpointRequest.setEndpointURL(endpoint);
    registerEndpointRequest.setServiceName(service);
    try {
      client.registerEndpoint(registerEndpointRequest);
      System.out.println("Endpoint registered successfully");
    } catch (WebApplicationException ex) {
      System.err.println(ex.getMessage());
View Full Code Here

    System.out.println("Property: " + key + "=" + value);
    WebClient wc = WebClient.create(BASE_ADDRESS);
    EntryType et = new EntryType();
    et.setKey(key);
    et.getValue().add(value);
    RegisterEndpointRequest registerEndpointRequest = new RegisterEndpointRequest();
    registerEndpointRequest.setEndpointURL(endpoint);
    registerEndpointRequest.setBinding(BindingType.JAXRS);
    registerEndpointRequest.setTransport(TransportType.HTTPS);
    registerEndpointRequest.setServiceName(service);
    registerEndpointRequest.getEntryType().add(et);
    try {
      wc.post(registerEndpointRequest);
      System.out.println("Endpoint registered successfully");
    } catch (WebApplicationException ex) {
      System.err.println(ex.getMessage());
View Full Code Here

    private SeekBookError prepareException(String message) {
        ExceptionType exception = new ExceptionType();
        exception.setOperation("seekBook");
        exception.setServiceName("LibraryService");
        exception.setExceptionText(message);
        ExceptionFrame frame = new ExceptionFrame();
        frame.getException().add(exception);
        SeekBookError e = new SeekBookError("Book not found", frame);
        return e;
    }
View Full Code Here

    System.out.println("ZIP: " + zip);
    System.out.println("Borrowed: " + borrowed);
  }

    public static void showExceptionFrame(ExceptionFrame exceptionFrame) {
        ExceptionType type = exceptionFrame.getException().get(0);
        if (type != null && type.getExceptionText() != null) {
            System.out.print("Error message is: " + type.getExceptionText());
        }
    }
View Full Code Here

            System.out.println(name);
        }
    }

    private SeekBookError prepareException(String message) {
        ExceptionType exception = new ExceptionType();
        exception.setOperation("seekBook");
        exception.setServiceName("LibraryService");
        exception.setExceptionText(message);
        ExceptionFrame frame = new ExceptionFrame();
        frame.getException().add(exception);
        SeekBookError e = new SeekBookError("Book not found", frame);
        return e;
    }
View Full Code Here

    public void publishNewBooksNotifications() throws InterruptedException {
        for (int ndx = 1; ndx < 6; ndx++) {
            Thread.sleep(4000L);
            List<BookType> newBooks = new LinkedList<BookType>();
      BookType book = new BookType();
      newBooks.add(book);
      PersonType author = new PersonType();
      book.getAuthor().add(author);
      author.setFirstName("Jack");
      author.setLastName("Icebear");
      Calendar dateOfBirth = new GregorianCalendar(101, Calendar.JANUARY, 2);
      author.setDateOfBirth(dateOfBirth.getTime());
      book.getTitle().add("More About Survival in the Arctic - Volume " + ndx);
      book.getPublisher().add("Frosty Edition");
      book.setYearPublished("2011");
      System.out.println("Publishing notification about a new book:");
      System.out.println("Jack Icebear - More About Survival in the Arctic - Volume " + ndx);
      library.newBooks(new Date(), newBooks);
        }
    }
View Full Code Here

                throw e;
            }
        }
        ListOfBooks result = new ListOfBooks();
        BookType book = new BookType();
        result.getBook().add(book);
        PersonType author = new PersonType();
        book.getAuthor().add(author);
        author.setFirstName("Jack");
        author.setLastName("Icebear");
        Calendar dateOfBirth = new GregorianCalendar(101, Calendar.JANUARY, 2);
        author.setDateOfBirth(dateOfBirth.getTime());
        book.getTitle().add("Survival in the Arctic");
        book.getPublisher().add("Frosty Edition");
        book.setYearPublished("2010");

        System.out.println("Book(s) is found:");

        showSeekBookResponse(result);
View Full Code Here

TOP

Related Classes of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_11$_1

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.