|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.virtual.plugins.context.AbstractVirtualFileHandler
public abstract class AbstractVirtualFileHandler
AbstractVirtualFileHandler.
| Field Summary | |
|---|---|
protected long |
cachedLastModified
|
protected static org.jboss.logging.Logger |
log
The log |
protected URL |
vfsUrl
|
| Constructor Summary | |
|---|---|
protected |
AbstractVirtualFileHandler(VFSContext context,
VirtualFileHandler parent,
String name)
Create a new handler |
| Method Summary | |
|---|---|
protected void |
checkClosed()
Check whether we are closed |
void |
close()
Close the resources |
protected int |
decrement()
Decrement the reference count |
protected void |
doClose()
The real close |
boolean |
equals(Object obj)
|
String |
getName()
Get the simple VF name (X.java) |
VirtualFileHandler |
getParent()
Get the parent |
String |
getPathName()
Get the VFS relative path name (org/jboss/X.java) |
VFSContext |
getVFSContext()
Get the VFSContext this file belongs to |
VirtualFile |
getVirtualFile()
Get the virtual file wrapper |
boolean |
hasBeenModified()
Returns true if the file has been modified since this method was last called Last modified time is initialized at handler instantiation. |
int |
hashCode()
|
protected int |
increment()
Increment the reference count |
void |
setPathName(String path)
todo This is a hack until we can fix http://jira.jboss.com/jira/browse/JBMICROCONT-164 |
VirtualFileHandler |
simpleFindChild(String path)
Simple implementation of findChild |
VirtualFileHandler |
structuredFindChild(String path)
Structured implementation of find child |
String |
toString()
|
URL |
toURL()
Get the VF URL (file://root/org/jboss/X.java) |
URL |
toVfsUrl()
Get a VFS-based URL |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jboss.virtual.spi.VirtualFileHandler |
|---|
exists, findChild, getChildren, getLastModified, getSize, isHidden, isLeaf, openStream, toURI |
| Field Detail |
|---|
protected static final org.jboss.logging.Logger log
protected URL vfsUrl
protected transient long cachedLastModified
| Constructor Detail |
|---|
protected AbstractVirtualFileHandler(VFSContext context,
VirtualFileHandler parent,
String name)
context - the contextparent - the parentname - the name
IllegalArgumentException - if the context or name is null;| Method Detail |
|---|
public boolean hasBeenModified()
throws IOException
VirtualFileHandler
hasBeenModified in interface VirtualFileHandlerIOExceptionpublic String getName()
VirtualFileHandler
getName in interface VirtualFileHandlerpublic String getPathName()
VirtualFileHandler
getPathName in interface VirtualFileHandlerpublic void setPathName(String path)
path -
public URL toURL()
throws MalformedURLException,
URISyntaxException
VirtualFileHandler
toURL in interface VirtualFileHandlerMalformedURLException - for any error
URISyntaxException - for an error parsing the URI
public URL toVfsUrl()
throws MalformedURLException,
URISyntaxException
VirtualFileHandler
toVfsUrl in interface VirtualFileHandlerMalformedURLException
URISyntaxExceptionpublic VirtualFile getVirtualFile()
VirtualFileHandler
getVirtualFile in interface VirtualFileHandler
public VirtualFileHandler getParent()
throws IOException
VirtualFileHandler
getParent in interface VirtualFileHandlerIOException - for an error accessing the file systempublic VFSContext getVFSContext()
VirtualFileHandler
getVFSContext in interface VirtualFileHandlerprotected int increment()
protected int decrement()
protected void checkClosed()
throws IllegalStateException
IllegalStateException - when closedpublic void close()
VirtualFileHandler
close in interface VirtualFileHandlerprotected void doClose()
public VirtualFileHandler structuredFindChild(String path)
throws IOException
path - the path
IOException - for any error accessing the virtual file system
IllegalArgumentException - for a null name
public VirtualFileHandler simpleFindChild(String path)
throws IOException
path - the path
IOException - for any error accessing the virtual file system
IllegalArgumentException - for a null namepublic String toString()
toString in class Objectpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||