com.caucho.vfs
Class JndiPath

java.lang.Object
  extended by com.caucho.vfs.Path
      extended by com.caucho.vfs.FilesystemPath
          extended by com.caucho.vfs.JndiPath
All Implemented Interfaces:
java.lang.Comparable<Path>

public class JndiPath
extends FilesystemPath

Adapts the JNDI to the Path API. The name separator is always '/'.

Since:
Resin 1.2

Field Summary
protected static L10N L
           
protected static java.util.logging.Logger log
           
 
Fields inherited from class com.caucho.vfs.FilesystemPath
_bindRoot, _pathname, _root, _userPath
 
Fields inherited from class com.caucho.vfs.Path
_pathSeparatorChar, _schemeMap, _separatorChar
 
Constructor Summary
  JndiPath()
          Creates a new JndiPath root.
protected JndiPath(FilesystemPath root, java.lang.String userPath, java.lang.String path)
          Create a new JndiPath with the given name.
 
Method Summary
 Path fsWalk(java.lang.String userPath, java.util.Map<java.lang.String,java.lang.Object> attributes, java.lang.String path)
          Walking down the path just stores the new name in the created Path.
 java.lang.Object getObject()
          Returns the object bound at this path.
 java.lang.String getScheme()
          The scheme is always "jndi:".
 boolean mkdir()
          Create a new subcontext
 void setObject(java.lang.Object value)
          Sets the object bound at this path.
 
Methods inherited from class com.caucho.vfs.FilesystemPath
bind, createRoot, equals, getFullPath, getParent, getPath, getRoot, getTail, getUserPath, hashCode, normalizePath, normalizePath, schemeWalk, setUserPath
 
Methods inherited from class com.caucho.vfs.Path
cacheCopy, canExecute, canRead, canWrite, changeGroup, changeGroup, changeOwner, changeOwner, chmod, clearStatusCache, compareTo, copy, createDepend, createLink, createNewFile, createRoot, createTempFile, escapeURL, exists, getAttribute, getAttributeNames, getBlockCount, getBlockSize, getCache, getCertificates, getContentType, getCrc64, getCreateTime, getDevice, getDeviceId, getDiskSpaceFree, getDiskSpaceTotal, getFileSeparatorChar, getGroup, getHost, getInode, getLastAccessTime, getLastModified, getLastStatusChangeTime, getLength, getMode, getNativePath, getNewlineString, getNumberOfLinks, getOwner, getPathSeparatorChar, getPort, getQuery, getRelativePath, getResources, getResources, getSchemeMap, getSeparatorChar, getURL, getUser, getUserDir, getValue, isBlockDevice, isCharacterDevice, isDirectory, isExecutable, isFIFO, isFile, isHardLink, isLink, isObject, isPathCacheable, isSocket, isSymbolicLink, isWindows, isWindowsInsecure, iterator, list, lookup, lookup, lookup, lookupImpl, lookupNative, lookupNative, lookupRelativeNativePath, mkdirs, openAppend, openAppendImpl, openFileRandomAccess, openMemoryMappedFile, openRandomAccess, openRead, openReadImpl, openReadWrite, openReadWrite, openReadWrite, openReadWriteImpl, openWrite, openWriteImpl, putCache, readLink, realPath, remove, removeAll, renameTo, renameTo, scanScheme, setDefaultSchemeMap, setExecutable, setLastModified, setTestWindows, setValue, toString, truncate, truncate, unbind, writeToStream, writeToStream
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log

L

protected static final L10N L
Constructor Detail

JndiPath

public JndiPath()
Creates a new JndiPath root.


JndiPath

protected JndiPath(FilesystemPath root,
                   java.lang.String userPath,
                   java.lang.String path)
Create a new JndiPath with the given name.

Method Detail

fsWalk

public Path fsWalk(java.lang.String userPath,
                   java.util.Map<java.lang.String,java.lang.Object> attributes,
                   java.lang.String path)
Walking down the path just stores the new name in the created Path.

Specified by:
fsWalk in class FilesystemPath
Parameters:
userPath - the string used in the lookup call.
attributes - any inherited attributes.
path - the normalized slash-separated path.
Returns:
a new JndiPath representing the new path.

getScheme

public java.lang.String getScheme()
The scheme is always "jndi:".

Specified by:
getScheme in class Path

mkdir

public boolean mkdir()
              throws java.io.IOException
Create a new subcontext

Overrides:
mkdir in class Path
Returns:
true if successful.
Throws:
java.io.IOException

getObject

public java.lang.Object getObject()
                           throws java.io.IOException
Returns the object bound at this path.

Overrides:
getObject in class Path
Throws:
java.io.IOException

setObject

public void setObject(java.lang.Object value)
               throws java.io.IOException
Sets the object bound at this path.

Overrides:
setObject in class Path
Parameters:
value - the new value
Throws:
java.io.IOException