Examples of ResourceHandle


Examples of aQute.bnd.service.ResourceHandle

    private File getFile() {
        try {
            File file;
            if (repo instanceof RemoteRepositoryPlugin) {
                ResourceHandle handle = ((RemoteRepositoryPlugin) repo).getHandle(bsn, "latest", Strategy.HIGHEST, null);
                if (handle.getLocation() == Location.local || handle.getLocation() == Location.remote_cached)
                    file = handle.request();
                else
                    file = null;
            } else {
                SortedSet<Version> versions = repo.versions(bsn);
                if (versions == null || versions.isEmpty())
View Full Code Here

Examples of aQute.bnd.service.ResourceHandle

  public synchronized void setReporter(Reporter reporter) {
    this.reporter = reporter;
  }
 
  public File get(String bsn, String range, Strategy strategy, Map<String, String> properties) throws Exception {
    ResourceHandle handle = getHandle(bsn, range, strategy, properties);
    return handle != null ? handle.request() : null;
  }
View Full Code Here

Examples of aQute.bnd.service.ResourceHandle

    ResourceHandle handle = getHandle(bsn, range, strategy, properties);
    return handle != null ? handle.request() : null;
  }
 
  public ResourceHandle getHandle(String bsn, String range, Strategy strategy, Map<String, String> properties) throws Exception {
    ResourceHandle result;
    if (bsn != null)
      result = resolveBundle(bsn, range, strategy);
    else {
      String pkgName = properties.get(CapabilityType.PACKAGE.getTypeName());
     
View Full Code Here

Examples of aQute.bnd.service.ResourceHandle

 
  List<ResourceHandle> mapResourcesToHandles(Collection<Resource> resources) throws Exception {
    List<ResourceHandle> result = new ArrayList<ResourceHandle>(resources.size());
   
    for (Resource resource : resources) {
      ResourceHandle handle = mapResourceToHandle(resource);
      if (handle != null)
        result.add(handle);
    }
   
    return result;
View Full Code Here

Examples of aQute.bnd.service.ResourceHandle

   
    return result;
  }
 
  ResourceHandle mapResourceToHandle(Resource resource) throws Exception {
    ResourceHandle result = null;
   
    CachingURLResourceHandle handle ;
    try {
      handle = new CachingURLResourceHandle(resource.getUrl(), resource.getBaseUrl(), getCacheDirectory(), getConnector(), CachingMode.PreferCache);
    } catch (FileNotFoundException e) {
View Full Code Here

Examples of aQute.bnd.service.ResourceHandle

    if (strategy == Strategy.EXACT) {
      return findExactMatch(bsn, rangeStr, bsnMap);
    }
   
    ResourceHandle[] handles = getHandles(bsn, rangeStr);
    ResourceHandle selected;
    if (handles == null || handles.length == 0)
      selected = null;
    else {
      switch(strategy) {
      case LOWEST:
View Full Code Here

Examples of com.sun.appserv.connectors.internal.api.ResourceHandle

            EJBTimerService timerService) throws Exception {

        boolean redeliver = false;

        // There is no resource associated with the delivery of the timeout.
        ResourceHandle nullResourceHandle = null;

        try {

            Method method = getTimeoutMethod(timerState);
                       
View Full Code Here

Examples of com.sun.enterprise.resource.ResourceHandle

                           EJBTimerService timerService) throws Exception {
    
        boolean redeliver = false;
    
        // There is no resource associated with the delivery of the timeout.
        ResourceHandle nullResourceHandle = null;

        try {

            // Do pre-invoke logic for message bean with tx import = false
            // and a null resource handle.
View Full Code Here

Examples of com.sun.enterprise.resource.ResourceHandle

    }

    public ResourceHandle createResource(XAResource xaResource)
         throws PoolingException {

        ResourceHandle resourceHandle = null;
        ResourceSpec spec =
                new ResourceSpec(JMS_RESOURCE_FACTORY,
                                 ResourceSpec.JMS);
       
        if (xaResource != null) {
           
            logger.logp(Level.FINEST,
                    "BasicResourceAllocator", "createResource",
                    "NOT NULL", xaResource);
           
            try {
                resourceHandle = new ResourceHandle(
                        null,  //no object present
            spec,
                        this, null);
               
                if (logger.isLoggable(Level.FINEST)) {
                    xaResource = new XAResourceWrapper(xaResource);
                }
                   
                resourceHandle.fillInResourceObjects(null, xaResource);

            } catch (Exception e) {
                throw (PoolingException) (new PoolingException()).initCause(e);
            }
        } else {
View Full Code Here

Examples of com.sun.enterprise.resource.ResourceHandle

                    "EndpointFactory is currently not available");
        }
       
        MessageEndpoint endpoint = null;
        try {
            ResourceHandle resourceHandle = allocator_.createResource(xa);
           
            MessageBeanListener listener =
                messageBeanPM_.createMessageBeanListener(resourceHandle);

            //Use the MDB's application classloader to load the
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.