All Packages Class Hierarchy This Package Previous Next Index
Provides a factory interface to the remote file classes, since these
objects cannot be instantiated by classes outside of the
jnfs
package. The server side consists of an implementation
of the file system interface (provided by FileServerStarter
)
and the client side must obtain a remote reference to the server
(provided by the FileServerHandle
).
Token
for use in
further transactions.
RemoteFile
instance that represents the file
whose pathname is the given file argument.
File
object.
File
object.
File
object for appending or overwriting.
File
argument.
Challenge
for user
to sign
with their private key.
public static final String serviceName
To get a handle to the FileServer, use a snippet of code such as:
jnfs.FileServer srv = (jnfs.FileServer) java.rmi.Naming.lookup("rmi://" + hostname + "/" + jnfs.FileServer.serviceName);
public abstract Challenge initAuthentication(String user) throws RemoteException, AuthenticationException
Challenge
for user
to sign
with their private key. The user responds by creating a
Response
object using the
Challenge.issueRespose
method, and then sends the
credentials back in the finishAuthentication
method.
user
is not found in the user table.
public abstract Token finishAuthentication(Response credentials) throws RemoteException, AuthenticationException
Token
for use in
further transactions.
Challenge
issued previously.
user
fails.
public abstract RemoteFile getFile(Token token, File file) throws RemoteException, AuthenticationException, FileTableFullException
RemoteFile
instance that represents the file
whose pathname is the given file argument.
null
.
user
fails.
public abstract RemoteFileInputStream getFileInputStream(Token token, File file) throws IOException, RemoteException, AuthenticationException, PermissionDeniedException
File
object.
checkRead
method is called with the pathname
of this File
argument to see if the
application is allowed read access to the file.
user
fails.
public abstract RemoteFileOutputStream getFileOutputStream(Token token, File file) throws IOException, RemoteException, AuthenticationException, PermissionDeniedException
File
object.
checkWrite
method is called with the pathname
of the File
argument to see if the
application is allowed write access to the file. This may
result in a security exception.
user
fails.
public abstract RemoteFileOutputStream getFileOutputStream(Token token, File file, boolean append) throws IOException, RemoteException, AuthenticationException, PermissionDeniedException
File
object for appending or overwriting.
checkWrite
method is called with the pathname
of the File
argument to see if the
application is allowed write access to the file. This may
result in a security exception.
user
fails.
public abstract RemoteRandomAccessFile getRandomAccessFile(Token token, File file, String mode) throws IOException, RemoteException, AuthenticationException, PermissionDeniedException
File
argument.
The mode argument must either be equal to "r"
or to
"rw"
, indicating either to open the file for input,
or for both input and output, respectively.
"r"
or to "rw"
.
checkRead
method is called with the pathname
of the File
argument to see if the
application is allowed read access to the file. If the
mode argument is equal to "rw"
, its
checkWrite
method also is called with the
pathname to see if the application is allowed write access
to the file.
user
fails.
public abstract String getRootDirectoryName() throws RemoteException
All Packages Class Hierarchy This Package Previous Next Index