com.caucho.vfs
Class TcpPath

java.lang.Object
  extended by com.caucho.vfs.Path
      extended by com.caucho.vfs.TcpPath
All Implemented Interfaces:
java.lang.Comparable<Path>
Direct Known Subclasses:
TcpsPath

public class TcpPath
extends Path

Implements a tcp stream, essentially just a socket pair.


Field Summary
static java.lang.String CONNECT_TIMEOUT
           
 
Fields inherited from class com.caucho.vfs.Path
_pathSeparatorChar, _schemeMap, _separatorChar, L
 
Constructor Summary
TcpPath(TcpPath root, java.lang.String userPath, java.util.Map<java.lang.String,java.lang.Object> newAttributes, java.lang.String host, int port)
           
 
Method Summary
protected  Path cacheCopy()
          Copy for caching.
protected  TcpPath create(TcpPath root, java.lang.String userPath, java.util.Map<java.lang.String,java.lang.Object> newAttributes, java.lang.String host, int port)
           
 java.lang.String getHost()
          Returns the hostname
 java.lang.String getPath()
          Returns the path.
 int getPort()
          Returns the port.
 java.lang.String getScheme()
          Returns the url scheme
 java.net.SocketAddress getSocketAddress()
           
 java.lang.String getURL()
          Returns the full url for the given path.
 StreamImpl openReadImpl()
           
 StreamImpl openReadWriteImpl()
           
 Path schemeWalk(java.lang.String userPath, java.util.Map<java.lang.String,java.lang.Object> newAttributes, java.lang.String uri, int offset)
          Lookup the new path assuming we're the scheme root.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.vfs.Path
bind, canExecute, canRead, canWrite, changeGroup, changeGroup, changeOwner, changeOwner, chmod, clearStatusCache, compareTo, copy, createDepend, createLink, createNewFile, createRoot, createRoot, createTempFile, equals, escapeURL, exists, getAttribute, getAttributeNames, getBlockCount, getBlockSize, getCache, getCertificates, getContentType, getCrc64, getCreateTime, getDevice, getDeviceId, getDiskSpaceFree, getDiskSpaceTotal, getFileSeparatorChar, getFullPath, getGroup, getInode, getLastAccessTime, getLastModified, getLastStatusChangeTime, getLength, getMode, getNativePath, getNewlineString, getNumberOfLinks, getObject, getOwner, getParent, getPathSeparatorChar, getQuery, getRelativePath, getResources, getResources, getSchemeMap, getSeparatorChar, getTail, getUser, getUserDir, getUserPath, getValue, hashCode, isBlockDevice, isCharacterDevice, isDirectory, isExecutable, isFIFO, isFile, isHardLink, isLink, isObject, isPathCacheable, isSocket, isSymbolicLink, isWindows, isWindowsInsecure, iterator, list, lookup, lookup, lookup, lookupImpl, lookupNative, lookupNative, lookupRelativeNativePath, mkdir, mkdirs, openAppend, openAppendImpl, openFileRandomAccess, openMemoryMappedFile, openRandomAccess, openRead, openReadWrite, openReadWrite, openReadWrite, openWrite, openWriteImpl, putCache, readLink, realPath, remove, removeAll, renameTo, renameTo, scanScheme, setDefaultSchemeMap, setExecutable, setLastModified, setObject, setTestWindows, setUserPath, setValue, truncate, truncate, unbind, writeToStream, writeToStream
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CONNECT_TIMEOUT

public static final java.lang.String CONNECT_TIMEOUT
See Also:
Constant Field Values
Constructor Detail

TcpPath

public TcpPath(TcpPath root,
               java.lang.String userPath,
               java.util.Map<java.lang.String,java.lang.Object> newAttributes,
               java.lang.String host,
               int port)
Method Detail

schemeWalk

public Path schemeWalk(java.lang.String userPath,
                       java.util.Map<java.lang.String,java.lang.Object> newAttributes,
                       java.lang.String uri,
                       int offset)
Lookup the new path assuming we're the scheme root.

Specified by:
schemeWalk in class Path
Parameters:
userPath - the user's lookup() path.
newAttributes - the attributes for the new path.
uri - the lookup() path
offset - offset into newPath to start lookup.
Returns:
the found path

create

protected TcpPath create(TcpPath root,
                         java.lang.String userPath,
                         java.util.Map<java.lang.String,java.lang.Object> newAttributes,
                         java.lang.String host,
                         int port)

getScheme

public java.lang.String getScheme()
Description copied from class: Path
Returns the url scheme

Specified by:
getScheme in class Path

getURL

public java.lang.String getURL()
Description copied from class: Path
Returns the full url for the given path.

Overrides:
getURL in class Path

getPath

public java.lang.String getPath()
Description copied from class: Path
Returns the path. e.g. for HTTP, returns the part after the host and port.

Specified by:
getPath in class Path

getHost

public java.lang.String getHost()
Description copied from class: Path
Returns the hostname

Overrides:
getHost in class Path

getPort

public int getPort()
Description copied from class: Path
Returns the port.

Overrides:
getPort in class Path

getSocketAddress

public java.net.SocketAddress getSocketAddress()

openReadImpl

public StreamImpl openReadImpl()
                        throws java.io.IOException
Overrides:
openReadImpl in class Path
Throws:
java.io.IOException

openReadWriteImpl

public StreamImpl openReadWriteImpl()
                             throws java.io.IOException
Overrides:
openReadWriteImpl in class Path
Throws:
java.io.IOException

cacheCopy

protected Path cacheCopy()
Description copied from class: Path
Copy for caching.

Overrides:
cacheCopy in class Path

toString

public java.lang.String toString()
Overrides:
toString in class Path