|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.starla.smb.SMBSessionFactory
The SMBSessionFactory static class is used to create sessions to remote shared resources using the SMB/CIFS protocol. A PCShare object is used to specify the remote node and share details, as well as required access control details.
The OpenDisk () method opens a session to a remote disk share. The returned session object provides disk specific methods such as opening remote files, file and directory operations such as deleting files, renaming files etc. The disk session may also be used to start directory searches to list files/directories in a particular remote path.
The OpenPrinter () method opens a session to a remote printer share. The returned session object provides print spooling functionality. To perform remote printer admin functions use the OpenAdminSession () method to create an admin session to the remote node.
The OpenPipe () method opens a session to a remote named pipe share.
The OpenAdminSession () method creates a session that is connected to the remote IPC$ share, that is used for admin related functions, such as listing the available shares on the remote node, listing print queues and manipulting jobs in the remote printer queues.
Constructor Summary | |
SMBSessionFactory()
|
Method Summary | |
static SMBServerList |
getDomainList()
Return the list of available domains/workgroups. |
java.lang.String |
getLocalDomain()
Return the local domain name, if known. |
static SMBServerList |
getServerList(java.lang.String domnam)
Get the list of nodes in the specified domain |
static SMBServerList |
getServerList(java.lang.String domnam,
int srvFlags)
Get the list of nodes in the specified domain that match the node type flags. |
static boolean |
hasSessionDebug()
Determine if SMB session debugging is enabled. |
static java.lang.String |
isVersion()
Return a version string for this software release |
static SMBAdminSession |
OpenAdminSession(PCShare shr)
Open a connection to a remote server admin pipe |
static SMBDiskSession |
OpenDisk(PCShare shr)
Open a connection to a remote file server disk share. |
static com.starla.smb.SMBIPCSession |
OpenPipe(PCShare shr)
Open a connection to a remote pipe/IPC |
static SMBPrintSession |
OpenPrinter(PCShare shr)
Open a connection to a remote print server |
static void |
setSessionDebug(boolean dbg)
Enable/disable SMB session debugging. |
static void |
setSubnetMask(java.lang.String subnet)
Set the subnet mask string for network broadcast requests If the subnet mask is not set a default broadcast mask for the TCP/IP address class will be used. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SMBSessionFactory()
Method Detail |
public static final SMBServerList getDomainList() throws SMBException, java.io.IOException
public java.lang.String getLocalDomain()
public static final SMBServerList getServerList(java.lang.String domnam) throws java.io.IOException, SMBException
domnam
- Domain name to return nodes forpublic static final SMBServerList getServerList(java.lang.String domnam, int srvFlags) throws SMBException, java.io.IOException
domnam
- Domain name to return nodes forsrvFlags
- Node type flagspublic static final boolean hasSessionDebug()
public static final java.lang.String isVersion()
public static final SMBAdminSession OpenAdminSession(PCShare shr) throws java.io.IOException, java.net.UnknownHostException, SMBException
shr
- Remote share information object.public static final SMBDiskSession OpenDisk(PCShare shr) throws java.io.IOException, java.net.UnknownHostException, SMBException
shr
- Remote share information object.public static final com.starla.smb.SMBIPCSession OpenPipe(PCShare shr) throws java.io.IOException, java.net.UnknownHostException, SMBException
shr
- Remote share information object.public static final SMBPrintSession OpenPrinter(PCShare shr) throws java.io.IOException, java.net.UnknownHostException, SMBException
shr
- Remote share information object.public static final void setSessionDebug(boolean dbg)
dbg
- true to enable SMB session debugging, else false.public static final void setSubnetMask(java.lang.String subnet)
subnet
- Subnet mask string, in 'nnn.nnn.nnn.nnn' format.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |