Examples of createContext()


Examples of org.jboss.com.sun.net.httpserver.HttpsServer.createContext()

                throw new RuntimeException ("should not be httpsserver");
            }
            s2 = HttpsServer.create (addr, 0);
            HttpHandler h = new FileServerHandler (root);
            HttpContext c1 = s1.createContext ("/test1", h);
            HttpContext c2 = s2.createContext ("/test1", h);
            executor = Executors.newCachedThreadPool();
            s1.setExecutor (executor);
            s2.setExecutor (executor);
            ctx = new SimpleSSLContext(System.getProperty("test.src")).get();
            s2.setHttpsConfigurator(new HttpsConfigurator (ctx));
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.JAXBContextFinder.createContext()

      {
         set.add(entry.getContent().getJAXBObject().getClass());
      }
      try
      {
         JAXBContext ctx = finder.createContext(annotations, set.toArray(new Class[set.size()]));
         Marshaller marshaller = ctx.createMarshaller();
         NamespacePrefixMapper mapper = new NamespacePrefixMapper()
         {
            public String getPreferredPrefix(String namespace, String s1, boolean b)
            {
View Full Code Here

Examples of org.jboss.ws.core.jaxws.JAXBContextFactory.createContext()

         {
            Endpoint endpoint = ((ServerEndpointMetaData)epMetaData).getEndpoint();
            bindingCustomization = endpoint!=null ? endpoint.getAttachment(BindingCustomization.class) : null;
         }

         jaxbCtx = factory.createContext(
           javaTypes.toArray(new Class[0]),
           typeRefs,
           targetNS,
           false, bindingCustomization
         );
View Full Code Here

Examples of org.jboss.wsf.spi.http.HttpServer.createContext()

      SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
      HttpServer httpServer = spiProvider.getSPI(HttpServerFactory.class).getHttpServer();
      httpServer.start();
     
      // Create the context and publish the endpoint
      HttpContext context = httpServer.createContext("/jaxws-endpoint");
      endpoint.publish(context);
   }
  
   @Override
   public void destroy()
View Full Code Here

Examples of org.jclouds.blobstore.BlobStoreContextFactory.createContext()

     * Strategy to perform any pre setup, before {@link org.apache.camel.CamelContext} is created
     */
    @Override
    protected void doPreSetup() throws Exception {
        BlobStoreContextFactory contextFactory = new BlobStoreContextFactory();
        BlobStoreContext blobStoreContext = contextFactory.createContext("transient", "identity", "credential");
        BlobStore blobStore = blobStoreContext.getBlobStore();
        blobStore.createContainerInLocation(null, TEST_CONTAINER);
        blobStore.clearContainer(TEST_CONTAINER);
    }

View Full Code Here

Examples of org.jclouds.compute.ComputeServiceContextFactory.createContext()

    ComputeServiceContext serviceContext = mock(ComputeServiceContext.class);
    ComputeService computeService = mock(ComputeService.class);
    TemplateBuilder templateBuilder = mock(TemplateBuilder.class);
    Template template = mock(Template.class);

    when(serviceContextFactory.createContext((String) any(), (String) any(), (String) any()
        (Iterable<? extends Module>) any(), (Properties) any())).thenReturn(serviceContext);
    when(serviceContext.getComputeService()).thenReturn(computeService);
    when(computeService.templateBuilder()).thenReturn(templateBuilder);
    when(templateBuilder.options((TemplateOptions) any())).thenReturn(templateBuilder);
    when(templateBuilder.build()).thenReturn(template);
View Full Code Here

Examples of org.jpedal.color.PdfPaint.createContext()

    PdfPaint col = gs.getNonstrokeColor();
    Rectangle bounds = currentShape.getBounds();
    bounds.setSize((int) (bounds.width * scaling), (int) (bounds.height * scaling));//dont like this cast
    if(col.isPattern()) {
      PaintContext context = col.createContext(null, bounds, bounds, scalingTransform, null);
      Raster raster = context.getRaster(bounds.x, bounds.y, bounds.width > 1 ? bounds.width : 1, bounds.height > 1 ? bounds.height : 1);

      BufferedImage img = new BufferedImage(bounds.width > 1 ? bounds.width : 1, bounds.height > 1 ? bounds.height : 1, BufferedImage.TYPE_4BYTE_ABGR);
      img.setData(raster);

View Full Code Here

Examples of org.kie.api.marshalling.ObjectMarshallingStrategy.createContext()

            ObjectMarshallingStrategy strategyObject = context.resolverStrategyFactory.getStrategyObject( _entry.getName() );
            if ( strategyObject == null ) {
                throw new IllegalStateException( "No strategy of type " + _entry.getName() + " available." );
            }
            context.usedStrategies.put( _entry.getId(), strategyObject );
            Context ctx = strategyObject.createContext();
            context.strategyContexts.put( strategyObject, ctx );
            if( _entry.hasData() && ctx != null ) {
    ClassLoader classLoader = null;
                if (context.classLoader != null ){
                    classLoader = context.classLoader;
View Full Code Here

Examples of org.kie.marshalling.ObjectMarshallingStrategy.createContext()

            ObjectMarshallingStrategy strategyObject = context.resolverStrategyFactory.getStrategyObject( _entry.getName() );
            if ( strategyObject == null ) {
                throw new IllegalStateException( "No strategy of type " + _entry.getName() + " available." );
            }
            context.usedStrategies.put( _entry.getId(), strategyObject );
            Context ctx = strategyObject.createContext();
            context.strategyContexts.put( strategyObject, ctx );
            if( _entry.hasData() && ctx != null ) {
    ClassLoader classLoader = null;
                if (context.classLoader != null ){
                    classLoader = context.classLoader;
View Full Code Here

Examples of org.mongolink.domain.mapper.ContextBuilder.createContext()

    public void before() {
        final Fongo fongo = new Fongo("test");
        db = (FongoDB) spy(fongo.getDB("test"));
        ContextBuilder cb = new ContextBuilder("org.mongolink.test.simpleMapping");
        session = new MongoSessionImpl(db, new CriteriaFactory());
        session.setMappingContext(cb.createContext());
        session.start();
    }

    @Test
    public void startAndStopASession() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.