Examples of create()


Examples of org.apache.whirr.service.ServiceFactory.create()

  @Test
  public void testAllOptions() throws Exception {
   
    ServiceFactory factory = mock(ServiceFactory.class);
    Service service = mock(Service.class);
    when(factory.create((String) any())).thenReturn(service);
    NodeMetadata node1 = new NodeMetadataImpl(null, "name1", "id1",
        new LocationImpl(LocationScope.PROVIDER, "location-id1",
            "location-desc1", null),
        null, Collections.<String,String>emptyMap(), null, null, "image-id",
        null, NodeState.RUNNING,

Examples of org.apache.whirr.state.ClusterStateStoreFactory.create()

    ClusterStateStore memStore = new MemoryClusterStateStore();
    memStore.save(createTestCluster(
      new String[]{"id1", "id2"}, new String[]{"role1", "role2"}));

    ClusterStateStoreFactory stateStoreFactory = mock(ClusterStateStoreFactory.class);
    when(stateStoreFactory.create((ClusterSpec) any())).thenReturn(memStore);

    ListClusterCommand command = new ListClusterCommand(factory, stateStoreFactory);

    Map<String, File> keys = KeyPair.generateTemporaryFiles();
    int rc = command.run(null, out, null, Lists.newArrayList(

Examples of org.apache.ws.eventing.SubscriptionHome.create()

         if ( body.getSubscribe(  ).getDelivery(  ).getMode(  ) != null )
         {
            delivery = new java.net.URI( body.getSubscribe(  ).getDelivery(  ).getMode(  ) );
         }

         Subscription subscription = sH.create( filter, expires, delivery );
         subscription.setNotificationConsumer( new ForwardConsumer( notifyto ) );
         subscription.setSubscriptionEndConsumer( new ForwardEndConsumer( endto ) );

         //check if topic expression
         //            if(filter instanceof TopicFilter == true){

Examples of org.apache.ws.muse.example.application.ApplicationHome.create()

                                                         CreateParamsType createparams )
   throws Exception
   {
      Context             initialContext = new InitialContext(  );
      ApplicationHome     home     = (ApplicationHome) initialContext.lookup( ApplicationHome.HOME_LOCATION );
      ApplicationResource resource = (ApplicationResource) home.create( context, createparams );
      ResourceadminHome   aHome    = (ResourceadminHome) getResourceContext().getResourceHome(  );
      aHome.getResources(  ).put( resource.getID(  ),
                                  resource );
      return resource.getEndpointReference(  );
   }

Examples of org.apache.ws.muse.example.businessprocesstype.BusinessprocesstypeHome.create()

   throws Exception
   {
      Context                     initialContext = new InitialContext(  );
      BusinessprocesstypeHome     home     =
         (BusinessprocesstypeHome) initialContext.lookup( BusinessprocesstypeHome.HOME_LOCATION );
      BusinessprocesstypeResource resource = (BusinessprocesstypeResource) home.create( context, createparams );
      ResourceadminHome           aHome    = (ResourceadminHome) getResourceContext().getResourceHome(  );
      aHome.getResources(  ).put( resource.getID(  ),
                                  resource );
      return resource.getEndpointReference(  );
   }

Examples of org.apache.ws.muse.example.host.HostHome.create()

                                        CreateParamsType createparams )
   throws Exception
   {
      Context           initialContext = new InitialContext(  );
      HostHome          home     = (HostHome) initialContext.lookup( HostHome.HOME_LOCATION );
      HostResource      resource = (HostResource) home.create( context, createparams );
      ResourceadminHome aHome    = (ResourceadminHome) context.getResourceHome(  );
      aHome.getResources(  ).put( resource.getID(  ),
                                  resource );
      return resource.getEndpointReference(  );
   }

Examples of org.apache.ws.muse.example.integrationserver.IntegrationserverHome.create()

   throws Exception
   {
      Context                   initialContext = new InitialContext(  );
      IntegrationserverHome     home     =
         (IntegrationserverHome) initialContext.lookup( IntegrationserverHome.HOME_LOCATION );
      IntegrationserverResource resource = (IntegrationserverResource) home.create( context, createparams );
      ResourceadminHome         aHome    = (ResourceadminHome) context.getResourceHome(  );
      aHome.getResources(  ).put( resource.getID(  ),
                                  resource );
      return resource.getEndpointReference(  );
   }

Examples of org.apache.ws.notification.base.v2004_06.impl.SubscriptionHome.create()

      Subscription subscription = null;
      try
      {
         subscription =
            subscriptionHome.create( SubscriptionResource.class,
                                     new XmlBeansEndpointReference( request.getConsumerReference(  ) ),
                                     producerEPR,
                                     initialTerminationTime,
                                     subPolicy,
                                     precondition,

Examples of org.apache.ws.resource.properties.ResourcePropertyMetaData.create()

    }

    private ResourceProperty createAnyProperty(QName propName)
    {
        ResourcePropertyMetaData propMetaData = new AnyResourcePropertyMetaData( propName );
        return propMetaData.create( getProperties() );
    }

    private Object[] getValue( ResourceProperty prop )
    {
        Object[] value = new Object[prop.size()];

Examples of org.apache.ws.resource.properties.impl.AnyResourcePropertyMetaData.create()

    }

    private ResourceProperty createAnyProperty(QName propName)
    {
        ResourcePropertyMetaData propMetaData = new AnyResourcePropertyMetaData( propName );
        return propMetaData.create( getProperties() );
    }

    private Object[] getValue( ResourceProperty prop )
    {
        Object[] value = new Object[prop.size()];
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.