uk.ac.rdg.resc.jstyx.server
Class StyxFileClient

java.lang.Object
  extended by uk.ac.rdg.resc.jstyx.server.StyxFileClient

public class StyxFileClient
extends java.lang.Object

Server's representation of a client of a StyxFile; created when a client succesfully opens a StyxFile

Author:
Jon Blower $Revision: 136 $ $Date: 2005-03-11 14:02:17 +0000 (Fri, 11 Mar 2005) $ $Log$ Revision 1.2 2005/03/11 14:02:16 jonblower Merged MINA-Test_20059309 into main line of development Revision 1.1.1.1.2.1 2005/03/09 19:44:18 jonblower Changes concerned with migration to MINA Revision 1.1.1.1 2005/02/16 18:58:33 jonblower Initial import

Constructor Summary
StyxFileClient(org.apache.mina.protocol.ProtocolSession session, long fid, int mode)
          A new StyxFileClient
 
Method Summary
 boolean canRead()
          Checks to see if the client can read from this file (i.e.
 boolean canWrite()
          Checks to see if the client can write to this file (i.e.
 boolean deleteOnClunk()
           
 long getFid()
           
 int getNextFileToRead()
           
 long getOffset()
           
 org.apache.mina.protocol.ProtocolSession getSession()
           
 void setNextFileToRead(int nextFileToRead)
           
 void setOffset(long offset)
           
 boolean truncate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StyxFileClient

public StyxFileClient(org.apache.mina.protocol.ProtocolSession session,
                      long fid,
                      int mode)
A new StyxFileClient

Parameters:
session - The connection the client is using
fid - The client's handle to the file. Remember that clients might have multiple fids opened on the same file
mode - the file mode as it appears in the TopenMessage (including the OTRUNC and ORCLOSE bits)
Method Detail

getSession

public org.apache.mina.protocol.ProtocolSession getSession()

getFid

public long getFid()

deleteOnClunk

public boolean deleteOnClunk()

truncate

public boolean truncate()

setOffset

public void setOffset(long offset)

getOffset

public long getOffset()

canRead

public boolean canRead()
Checks to see if the client can read from this file (i.e. if the client has opened the file with read access)


canWrite

public boolean canWrite()
Checks to see if the client can write to this file (i.e. if the client has opened the file with write access)


getNextFileToRead

public int getNextFileToRead()

setNextFileToRead

public void setNextFileToRead(int nextFileToRead)


Copyright © 2004-2006 Reading e-Science Centre. All Rights Reserved.