com.caucho.vfs
Class TcpPath

java.lang.Object
  |
  +--com.caucho.vfs.Path
        |
        +--com.caucho.vfs.TcpPath

public class TcpPath
extends Path

Implements a tcp stream, essentially just a socket pair.


Field Summary
protected  java.lang.String host
           
protected  int port
           
protected  long timeout
           
 
Fields inherited from class com.caucho.vfs.Path
L, schemeMap
 
Method Summary
 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.lang.String getURL()
          Returns the full url for the given path.
 StreamImpl openReadImpl()
           
 StreamImpl openReadWriteImpl()
           
protected  Path schemeWalk(java.lang.String userPath, java.util.Map newAttributes, java.lang.String uri, int offset)
          Lookup the new path assuming we're the scheme root.
 void setAttribute(java.lang.String attr, java.lang.Object value)
          Sets an attribute of the path.
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.vfs.Path
bind, canRead, canWrite, createNewFile, createRoot, createRoot, createTempFile, equals, exists, getAttribute, getAttributeNames, getContentType, getFullPath, getLastModified, getLength, getNativePath, getObject, getParent, getQuery, getTail, getUserPath, getValue, isDirectory, isFile, isObject, iterator, list, lookup, lookup, lookupNative, lookupNative, mkdir, mkdirs, openAppend, openAppendImpl, openRead, openReadWrite, openWrite, openWriteImpl, remove, removeAttribute, renameTo, renameTo, scanScheme, setLastModified, setObject, setUserPath, setValue, unbind, writeToStream
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

host

protected java.lang.String host

port

protected int port

timeout

protected long timeout
Method Detail

schemeWalk

protected Path schemeWalk(java.lang.String userPath,
                          java.util.Map newAttributes,
                          java.lang.String uri,
                          int offset)
Lookup the new path assuming we're the scheme root.
Overrides:
schemeWalk in class Path
Following copied from class: com.caucho.vfs.Path
Parameters:
userPath - the user's lookup() path.
newAttributes - the attributes for the new path.
newPath - the lookup() path
offset - offset into newPath to start lookup.
Returns:
the found path

getScheme

public java.lang.String getScheme()
Description copied from class: Path
Returns the url scheme
Overrides:
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.
Overrides:
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

setAttribute

public void setAttribute(java.lang.String attr,
                         java.lang.Object value)
                  throws java.io.IOException
Description copied from class: Path
Sets an attribute of the path.
Overrides:
setAttribute in class Path

openReadImpl

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

openReadWriteImpl

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

toString

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