Package org.apache.camel.impl.engine
Class WebSpherePackageScanClassResolver
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.impl.engine.BasePackageScanResolver
org.apache.camel.impl.engine.DefaultPackageScanClassResolver
org.apache.camel.impl.engine.WebSpherePackageScanClassResolver
- All Implemented Interfaces:
AutoCloseable
,org.apache.camel.CamelContextAware
,org.apache.camel.NonManagedService
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.spi.HasCamelContext
,org.apache.camel.spi.PackageScanClassResolver
,org.apache.camel.StatefulService
,org.apache.camel.StaticService
,org.apache.camel.SuspendableService
WebSphere specific resolver to handle loading annotated resources in JAR files.
-
Field Summary
Fields inherited from class org.apache.camel.impl.engine.BasePackageScanResolver
acceptableSchemes
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Enumeration
<URL> getResources
(ClassLoader loader, String packageName) Overloaded to handle specific problem with getting resources on the IBM WebSphere platform.static boolean
isWebSphereClassLoader
(ClassLoader loader) Is the classloader from IBM and thus the WebSphere platform?Methods inherited from class org.apache.camel.impl.engine.DefaultPackageScanClassResolver
addFilter, addIfMatching, clearCache, doLoadJarClassEntries, doStop, find, find, findAnnotated, findAnnotated, findByFilter, findImplementations, removeFilter
Methods inherited from class org.apache.camel.impl.engine.BasePackageScanResolver
addClassLoader, customResourceLocator, doInit, getCamelContext, getClassLoaders, getUrls, initialize, isAcceptableScheme, parseUrlPath, setAcceptableSchemes, setCamelContext
Methods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doStart, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.spi.PackageScanClassResolver
addClassLoader, getClassLoaders, setAcceptableSchemes
Methods inherited from interface org.apache.camel.Service
build, close, init, start, stop
Methods inherited from interface org.apache.camel.ShutdownableService
shutdown
Methods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending
Methods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
WebSpherePackageScanClassResolver
Constructor.- Parameters:
resourcePath
- the fixed resource path to use for fetching camel jars in WebSphere.
-
-
Method Details
-
isWebSphereClassLoader
Is the classloader from IBM and thus the WebSphere platform?- Parameters:
loader
- the classloader- Returns:
- true if IBM classloader, false otherwise.
-
getResources
Overloaded to handle specific problem with getting resources on the IBM WebSphere platform. WebSphere can not load resources if the resource to load is a folder name, such as a packagename, you have to explicit name a resource that is a file.- Overrides:
getResources
in classBasePackageScanResolver
- Parameters:
loader
- the classloaderpackageName
- the packagename for the package to load- Returns:
- URL's for the given package
- Throws:
IOException
- is thrown by the classloader
-