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


Variable Index

 o DBGDumpPacket
Debug option to enable dump of tx/rx packets
 o DBGHexDump
Debug option to hex dump packet data
 o DBGPacketType
Debug option to dump tx/rx packet type
 o DEFAULT_BUFSIZE
Default SMB packet size to allocate
 o RawRead
Various session status flags
 o RawWrite

Constructor Index

 o SMBSession(PCShare, int)
Construct an SMB session

Method Index

 o CloseSession()
Close this connection with the remote server.
 o getDeviceType()
Get the device type that this session is connected to.
 o getDialect()
Get the SMB dialect property
 o getDomain()
Get the servers primary domain name
 o getLANManagerType()
Get the servers LAN manager type
 o getMaximumPacketSize()
Get the maximum packet size allowed for this session
 o getOperatingSystem()
Get the servers operating system type
 o getPassword()
Get the remote share password string
 o getServer()
Get the remote server name
 o getSessionId()
Get the session identifier property
 o getShareName()
Get the remote share name
 o getUserId()
Return the assigned use id for this SMB session
 o getUserName()
Get the remote share user name string
 o hasDebugOption(int)
Determine if the specified debugging option is enabled
 o isActive()
Determine if the session is valid, ie.
 o isDebug()
Determine if SMB session debugging is enabled
 o print(String)
Output a string to the session debug stream
 o println()
Output a newline to the session debug stream
 o println(String)
Output a string to the session debug stream
 o setDebug(int)
Enable/disable SMB session debugging
 o toString()
Output the session details as a string

Variables

 o DBGPacketType
 public static final int DBGPacketType
Debug option to dump tx/rx packet type

 o DBGDumpPacket
 public static final int DBGDumpPacket
Debug option to enable dump of tx/rx packets

 o DBGHexDump
 public static final int DBGHexDump
Debug option to hex dump packet data

 o DEFAULT_BUFSIZE
 public static final int DEFAULT_BUFSIZE
Default SMB packet size to allocate

 o RawRead
 public static final int RawRead
Various session status flags

 o RawWrite
 public static final int RawWrite

Constructors

 o SMBSession
 public SMBSession(PCShare shr,
                   int dialect)
Construct an SMB session

Parameters:
shr - Remote server details.
dialect - SMB dialect for this session.

Methods

 o CloseSession
 public void CloseSession() throws IOException
Close this connection with the remote server.

Throws: IOException
If an I/O error occurs.
 o getDeviceType
 public final int getDeviceType()
Get the device type that this session is connected to.

Returns:
Device type for this session.
 o getDialect
 public final int getDialect()
Get the SMB dialect property

Returns:
SMB dialect that this session has negotiated.
 o getDomain
 public final String getDomain()
Get the servers primary domain name

Returns:
Servers primary domain name, if knwon, else null.
 o getLANManagerType
 public final String getLANManagerType()
Get the servers LAN manager type

Returns:
Servers LAN manager type, if known, else null.
 o getMaximumPacketSize
 public final int getMaximumPacketSize()
Get the maximum packet size allowed for this session

Returns:
Maximum packet size, in bytes.
 o getOperatingSystem
 public final String getOperatingSystem()
Get the servers operating system type

Returns:
Servers operating system, if known, else null.
 o getPassword
 public final String getPassword()
Get the remote share password string

Returns:
Remote share password string
 o getServer
 public final String getServer()
Get the remote server name

Returns:
Remote server name
 o getSessionId
 public final int getSessionId()
Get the session identifier property

Returns:
Session identifier
 o getShareName
 public final String getShareName()
Get the remote share name

Returns:
Remote share name string
 o getUserId
 public final int getUserId()
Return the assigned use id for this SMB session

Returns:
Assigned user id
 o getUserName
 public final String getUserName()
Get the remote share user name string

Returns:
Remote share user name string
 o 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
 o isActive
 public final boolean isActive()
Determine if the session is valid, ie. still open.

Returns:
true if the session is still active, else false.
 o isDebug
 public static boolean isDebug()
Determine if SMB session debugging is enabled

Returns:
true if debugging is enabled, else false.
 o print
 public static void print(String dbgstr)
Output a string to the session debug stream

Parameters:
dbgstr - Debug string
 o println
 public static void println()
Output a newline to the session debug stream

 o println
 public static void println(String dbgstr)
Output a string to the session debug stream

Parameters:
dbgstr - Debug string
 o 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
 o 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