public class Session extends Object implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
static org.apache.logging.log4j.Logger |
logger |
Modifier and Type | Method and Description |
---|---|
void |
close() |
static Session |
create(UserId userId,
DeviceId deviceId,
int port) |
Path |
getHiddenTeamFolder() |
static Session |
getInstance() |
Mailbox |
getMailbox() |
Path |
getPath() |
Team |
getTeam(TeamId id)
Returns a team by its id or null if not found.
|
Team |
getTeamByPath(Path path)
Retrieves a Team reference by its path relative to Teamshare path.
|
TeamFile |
getTeamFile(Path absoluteFile)
Returns a TeamFile instance from an absolute local file path.
|
public static Session getInstance()
public Team getTeam(TeamId id)
id
- public Mailbox getMailbox()
public Path getPath()
public Path getHiddenTeamFolder()
public Team getTeamByPath(Path path)
path
- team folder path relative to Teamshare pathpublic TeamFile getTeamFile(Path absoluteFile)
absoluteFile
- the absolute file pathpublic void close() throws Exception
close
in interface AutoCloseable
Exception