org.gnu.jcifs
Interface CifsSession

All Known Subinterfaces:
CifsDisk, CifsPrinter, CifsRemoteAdmin
All Known Implementing Classes:
SessionImpl

public interface CifsSession

Interface of all service sessions

Since:
1.0

Method Summary
 void disconnect()
          Disconnects session
 java.lang.String echo(java.lang.String text)
          Ping the server to test the connection to the server and to see if the server is still responding
 long getConnectTime()
          Returns the connect time in milliseconds (base: January 1, 1970 UTC )
 java.lang.String getNetBIOSName()
          Gets NetBIOS name
 java.lang.Object getProperty(java.lang.String key)
          Gets an API-user property
 java.net.InetAddress getServerAddress()
          Gets the address of the server
 java.lang.String getServerLanMan()
          Returns LAN Manager of the server
 java.lang.String getServerOS()
          Returns server OS name
 java.lang.String getServerPrimaryDomain()
          Returns the primary domain of the server
 long getServerTime()
          Returns the server time (from 1970 in msec)
 int getServerTimeZone()
          Time zone of server (min from UTC)
 java.lang.String getSessionName()
          Returns share name
 java.lang.String getShareName()
          Returns the name of this session
 boolean isConnected()
          Checks if the server is connected
 boolean isUserLevelSecurity()
          Returns true if the share has user level security
 void reconnect()
          Reconnects server if disconnected
 void setAllowAutoReconnection(boolean on)
          Sets automatic reconnection
 void setProperty(java.lang.String key, java.lang.Object value)
          Sets an API-user property.
 

Method Detail

setAllowAutoReconnection

public void setAllowAutoReconnection(boolean on)
Sets automatic reconnection
Parameters:
on - true if automatic reconnection allowed

getShareName

public java.lang.String getShareName()
Returns the name of this session
Returns:
session name

getSessionName

public java.lang.String getSessionName()
Returns share name

getServerOS

public java.lang.String getServerOS()
Returns server OS name
Returns:
os name or blank if unknown

getServerLanMan

public java.lang.String getServerLanMan()
Returns LAN Manager of the server
Returns:
LAN Manager or blank if unknown

getServerPrimaryDomain

public java.lang.String getServerPrimaryDomain()
Returns the primary domain of the server
Returns:
primary domain or blank if unknown

getNetBIOSName

public java.lang.String getNetBIOSName()
Gets NetBIOS name
Returns:
NetBIOS name of the server

getServerAddress

public java.net.InetAddress getServerAddress()
Gets the address of the server
Returns:
InetAddress address

getServerTimeZone

public int getServerTimeZone()
Time zone of server (min from UTC)
Returns:
minutes

getServerTime

public long getServerTime()
Returns the server time (from 1970 in msec)
Returns:
msec

isConnected

public boolean isConnected()
Checks if the server is connected
Returns:
true if the connection is alive

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
Sets an API-user property. The value is not interpreted by CifsService
Parameters:
key - property name
value - property value;
See Also:
getProperty(String)

getProperty

public java.lang.Object getProperty(java.lang.String key)
Gets an API-user property
Parameters:
key - property name
Returns:
property value;
See Also:
#setProperty(String)

isUserLevelSecurity

public boolean isUserLevelSecurity()
Returns true if the share has user level security
Returns:
true user level, false share level

getConnectTime

public long getConnectTime()
Returns the connect time in milliseconds (base: January 1, 1970 UTC )
Returns:
time in milliseconds

reconnect

public void reconnect()
               throws java.io.IOException
Reconnects server if disconnected
Throws:
java.io.IOException - if an I/O error occurs

disconnect

public void disconnect()
Disconnects session

echo

public java.lang.String echo(java.lang.String text)
                      throws java.io.IOException
Ping the server to test the connection to the server and to see if the server is still responding
Parameters:
text - text to send
Returns:
text returned by server (must be the same as the input text)
Throws:
java.io.IOException - if an I/O error occurs.