All Packages Class Hierarchy This Package Previous Next Index
Class com.starla.lite.SMBSession
java.lang.Object
|
+----com.starla.lite.SMBSession
- public class SMBSession
- extends Object
SMB session class
-
DBGDumpPacket
- Debug option to enable dump of tx/rx packets
-
DBGHexDump
- Debug option to hex dump packet data
-
DBGPacketType
- Debug option to dump tx/rx packet type
-
DEFAULT_BUFSIZE
- Default SMB packet size to allocate
-
RawRead
- Various session status flags
-
RawWrite
-
-
SMBSession(PCShare, int)
- Construct an SMB session
-
CloseSession()
- Close this connection with the remote server.
-
getDeviceType()
- Get the device type that this session is connected to.
-
getDialect()
- Get the SMB dialect property
-
getDomain()
- Get the servers primary domain name
-
getLANManagerType()
- Get the servers LAN manager type
-
getMaximumPacketSize()
- Get the maximum packet size allowed for this session
-
getOperatingSystem()
- Get the servers operating system type
-
getPassword()
- Get the remote share password string
-
getServer()
- Get the remote server name
-
getSessionId()
- Get the session identifier property
-
getShareName()
- Get the remote share name
-
getUserId()
- Return the assigned use id for this SMB session
-
getUserName()
- Get the remote share user name string
-
hasDebugOption(int)
- Determine if the specified debugging option is enabled
-
isActive()
- Determine if the session is valid, ie.
-
isDebug()
- Determine if SMB session debugging is enabled
-
print(String)
- Output a string to the session debug stream
-
println()
- Output a newline to the session debug stream
-
println(String)
- Output a string to the session debug stream
-
setDebug(int)
- Enable/disable SMB session debugging
-
toString()
- Output the session details as a string
DBGPacketType
public static final int DBGPacketType
- Debug option to dump tx/rx packet type
DBGDumpPacket
public static final int DBGDumpPacket
- Debug option to enable dump of tx/rx packets
DBGHexDump
public static final int DBGHexDump
- Debug option to hex dump packet data
DEFAULT_BUFSIZE
public static final int DEFAULT_BUFSIZE
- Default SMB packet size to allocate
RawRead
public static final int RawRead
- Various session status flags
RawWrite
public static final int RawWrite
SMBSession
public SMBSession(PCShare shr,
int dialect)
- Construct an SMB session
- Parameters:
- shr - Remote server details.
- dialect - SMB dialect for this session.
CloseSession
public void CloseSession() throws IOException
- Close this connection with the remote server.
- Throws: IOException
- If an I/O error occurs.
getDeviceType
public final int getDeviceType()
- Get the device type that this session is connected to.
- Returns:
- Device type for this session.
getDialect
public final int getDialect()
- Get the SMB dialect property
- Returns:
- SMB dialect that this session has negotiated.
getDomain
public final String getDomain()
- Get the servers primary domain name
- Returns:
- Servers primary domain name, if knwon, else null.
getLANManagerType
public final String getLANManagerType()
- Get the servers LAN manager type
- Returns:
- Servers LAN manager type, if known, else null.
getMaximumPacketSize
public final int getMaximumPacketSize()
- Get the maximum packet size allowed for this session
- Returns:
- Maximum packet size, in bytes.
getOperatingSystem
public final String getOperatingSystem()
- Get the servers operating system type
- Returns:
- Servers operating system, if known, else null.
getPassword
public final String getPassword()
- Get the remote share password string
- Returns:
- Remote share password string
getServer
public final String getServer()
- Get the remote server name
- Returns:
- Remote server name
getSessionId
public final int getSessionId()
- Get the session identifier property
- Returns:
- Session identifier
getShareName
public final String getShareName()
- Get the remote share name
- Returns:
- Remote share name string
getUserId
public final int getUserId()
- Return the assigned use id for this SMB session
- Returns:
- Assigned user id
getUserName
public final String getUserName()
- Get the remote share user name string
- Returns:
- Remote share user name string
hasDebugOption
public static boolean hasDebugOption(int opt)
- Determine if the specified debugging option is enabled
- Parameters:
- opt - Debug option bit mask
- Returns:
- true if the debug option is enabled, else false
isActive
public final boolean isActive()
- Determine if the session is valid, ie. still open.
- Returns:
- true if the session is still active, else false.
isDebug
public static boolean isDebug()
- Determine if SMB session debugging is enabled
- Returns:
- true if debugging is enabled, else false.
print
public static void print(String dbgstr)
- Output a string to the session debug stream
- Parameters:
- dbgstr - Debug string
println
public static void println()
- Output a newline to the session debug stream
println
public static void println(String dbgstr)
- Output a string to the session debug stream
- Parameters:
- dbgstr - Debug string
setDebug
public static void setDebug(int dbg)
- Enable/disable SMB session debugging
- Parameters:
- dbg - Bit mask of debug options to enable, or zero to disable
toString
public String toString()
- Output the session details as a string
- Returns:
- Session details string
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index