public class Session extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ACTION_CLOSE_DATA |
static int |
ACTION_END |
static int |
ACTION_NONE |
static int |
ACTION_OPEN_SOCKET |
static int |
ACTION_RETRIEVE |
static int |
ACTION_SEND_STREAM_DATA |
static int |
ACTION_STORE |
static int |
ACTION_SYNC_MASTER |
static int |
ACTION_SYNC_SLAVE |
Constructor and Description |
---|
Session(DPCServer.Connection connection,
UFTPTransferRequest job,
FileAccess fileAccess,
int maxParCons) |
Modifier and Type | Method and Description |
---|---|
void |
assertACL(File path)
checks whether the session's ACLs allow access to the file
|
boolean |
checkACL(File path)
checks whether the session's ACLs allow access to the file
|
RandomAccessFile |
createRandomAccessFile(File file,
String mode)
create a random access file for the current user and group
|
File |
getBaseDirectory() |
String[] |
getExcludes() |
UserFileAccess |
getFileAccess() |
String[] |
getIncludes() |
File |
getLocalFile() |
RandomAccessFile |
getLocalRandomAccessFile() |
int |
getNextAction() |
long |
getNumberOfBytes() |
long |
getOffset() |
InputStream |
getStream() |
boolean |
haveRange() |
boolean |
isAlive() |
boolean |
isAllowed(File path) |
boolean |
isForbidden(File path) |
void |
reset() |
void |
setRange(long offset,
long numberOfBytes) |
void |
setupLocalFile(File file,
boolean write) |
public static final int ACTION_END
public static final int ACTION_NONE
public static final int ACTION_RETRIEVE
public static final int ACTION_STORE
public static final int ACTION_SYNC_MASTER
public static final int ACTION_SYNC_SLAVE
public static final int ACTION_OPEN_SOCKET
public static final int ACTION_SEND_STREAM_DATA
public static final int ACTION_CLOSE_DATA
public Session(DPCServer.Connection connection, UFTPTransferRequest job, FileAccess fileAccess, int maxParCons)
public int getNextAction() throws IOException, ProtocolViolationException
public void setRange(long offset, long numberOfBytes)
public long getOffset()
public long getNumberOfBytes()
public UserFileAccess getFileAccess()
public void reset() throws IOException
IOException
public boolean haveRange()
public boolean isAlive()
public RandomAccessFile getLocalRandomAccessFile()
public File getLocalFile()
public void setupLocalFile(File file, boolean write) throws IOException
IOException
public File getBaseDirectory()
public RandomAccessFile createRandomAccessFile(File file, String mode) throws IOException
file
- mode
- - RandomAccessFile creation moIOException
public String[] getIncludes()
public String[] getExcludes()
public boolean checkACL(File path)
file
- true
if the file can be accessed, false
otherwisepublic void assertACL(File path) throws AuthorizationFailureException
path
- AuthorizationFailureException
- if the file cannot be accessedpublic boolean isAllowed(File path)
public boolean isForbidden(File path)
public InputStream getStream()
Copyright © 2010–2016 UNICORE. All rights reserved.