public class VirtualCircuit
extends java.lang.Object
Represents an authenticated circuit on an SMB/CIFS session. There may be multiple virtual circuits opened on a single session/socket connection.
| Modifier and Type | Field and Description |
|---|---|
static int |
DefaultConnections |
static int |
InvalidUID |
static int |
MaxConnections |
static SearchContextAdapter |
SearchSlotMarker |
| Constructor and Description |
|---|
VirtualCircuit(int vcNum,
ClientInfo cInfo)
Class constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
addConnection(SharedDevice shrDev)
Add a new connection to this virtual circuit.
|
int |
allocateSearchSlot()
Allocate a slot in the active searches list for a new search.
|
void |
closeCircuit(SrvSession sess)
Close the virtual circuit, close active tree connections
|
void |
deallocateSearchSlot(int ctxId)
Deallocate the specified search context/slot.
|
TreeConnection |
findConnection(int treeId)
Return the tree connection details for the specified tree id.
|
ClientInfo |
getClientInformation()
Return the client information
|
int |
getConnectionCount()
Return the active tree connection count
|
SearchContext |
getSearchContext(int srchId)
Return the search context for the specified search id.
|
org.alfresco.jlan.smb.server.SrvTransactBuffer |
getTransaction()
Return the active transaction buffer
|
int |
getUID()
Return the virtual circuit UID
|
int |
getVCNumber()
Return the virtual circuit number
|
boolean |
hasTransaction()
Check if there is an active transaction
|
boolean |
isLoggedOn()
Check if the virtual circuit has a valid user logged on
|
protected void |
removeConnection(int treeId,
SrvSession sess)
Remove the specified tree connection from the active connection list.
|
void |
setLoggedOn(boolean loggedOn)
Set the logged on status for the virtual circuit
|
void |
setSearchContext(int slot,
SearchContext srch)
Store the seach context in the specified slot.
|
void |
setTransaction(org.alfresco.jlan.smb.server.SrvTransactBuffer buf)
Set the active transaction buffer
|
void |
setUID(int uid)
Set the UID for the circuit
|
java.lang.String |
toString()
Return the virtual circuit details as a string
|
public static final int DefaultConnections
public static final int MaxConnections
public static final int InvalidUID
public static final SearchContextAdapter SearchSlotMarker
public VirtualCircuit(int vcNum,
ClientInfo cInfo)
vcNum - intcInfo - ClientInfopublic final int getUID()
public final int getVCNumber()
public final ClientInfo getClientInformation()
public int addConnection(SharedDevice shrDev) throws TooManyConnectionsException
shrDev - SharedDeviceTooManyConnectionsExceptionpublic final TreeConnection findConnection(int treeId)
treeId - intprotected void removeConnection(int treeId,
SrvSession sess)
treeId - intsess - SrvSessionpublic final int getConnectionCount()
public final int allocateSearchSlot()
public final void deallocateSearchSlot(int ctxId)
ctxId - intpublic final SearchContext getSearchContext(int srchId)
srchId - intpublic final void setSearchContext(int slot,
SearchContext srch)
slot - Slot to store the search context.srch - SearchContextpublic final boolean hasTransaction()
public final org.alfresco.jlan.smb.server.SrvTransactBuffer getTransaction()
public final void setTransaction(org.alfresco.jlan.smb.server.SrvTransactBuffer buf)
buf - TransactBufferpublic final void setUID(int uid)
uid - intpublic final void closeCircuit(SrvSession sess)
sess - SrvSessionpublic final boolean isLoggedOn()
public final void setLoggedOn(boolean loggedOn)
loggedOn - booleanpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.