|
Agent System POND 1.0 (1.7.2000) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--PkgAgentSystem.ResourcePackage
Used to find resources on a searchpath. Each classloader (and therefore each agent) has
its own resource package.
The searchpath consists of a number of files or directories separated by a semicolon.
Files must be either directly a resource or a jar- or zip-file (which will be searched).
Directories are searched for the resource directly (if the resource is contained in a package,
all '.' are replaced by '/' or '\' to reach the correct subdirectory). Also in directories all
contained zip- and jar-files are searched for the resource.
AgentClassLoader
Field Summary | |
protected String |
codeOrigin
From where the code is loaded. |
Constructor Summary | |
ResourcePackage(AgentData data)
Creates a new resource package for a certain agent. |
Method Summary | |
protected void |
EnumerateJarFile(Hashtable res,
String file,
String name)
Searches a JAR-file for all resource with a specific name. |
CertificateWrapper[] |
getCodeCertificates()
Returns all code certificates which were used to sign this package. |
protected URL |
getFromPackedFile(String file,
String name)
Searches a JAR- or ZIP-file for a specific resource and loads it. |
Manifest |
getManifest()
Returns the manifest for this code package. |
String |
getPackage()
Returns the name of a file, where the code for this resource package can be found. |
Enumeration |
getResources(String name)
Returns an enumeration of all LOCAL resource with this name from the codeOrigin of this object. |
URL |
getResourceURL(String name)
Returns an URL to the resource with the provided name. |
protected String |
getSearchPath()
Returns the complete searchpath. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected String codeOrigin
Constructor Detail |
public ResourcePackage(AgentData data)
data
- the management data of the agent for which to load classesMethod Detail |
protected String getSearchPath()
public URL getResourceURL(String name)
URL
to the resourcegetSearchPath()
,
URL.openStream()
,
URL.openConnection()
,
URLConnection
public Enumeration getResources(String name)
name
- the name of the resourcespublic Manifest getManifest()
public CertificateWrapper[] getCodeCertificates()
public String getPackage()
protected URL getFromPackedFile(String file, String name)
file
- filename to search (must be a JAR- or ZIP-file; will not be checked)name
- the name of the resource to findprotected void EnumerateJarFile(Hashtable res, String file, String name)
res
- Hashtable
where the found resource will be stored (URL with URL as key)file
- filename to search (must be a JAR-file; will not be checked)name
- the name of the resource to find
|
Agent System POND 1.0 (1.7.2000) | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |