public abstract class PrintSession extends Session
The print session allows a new print job to be created, using the SMBFile class or as an SMBOutputStream.
When the SMBFile/SMBOutputStream is closed the print job will be queued to the remote printer.
A print session is created using the SessionFactory.OpenPrinter() method. The SessionFactory negotiates the appropriate SMB dialect and creates the appropriate PrintSession derived object.
SessionFactory
Modifier and Type | Field and Description |
---|---|
static int |
DefaultEntryCount |
static int |
GraphicsMode |
static int |
TextMode |
Closed, DBGDumpPacket, DBGHexDump, DBGPacketType, DBGSigning, DEFAULT_BUFSIZE, m_pkt, m_treeid, NO_TRANSACTION, SecurityModeShare, SecurityModeUser
Modifier | Constructor and Description |
---|---|
protected |
PrintSession(PCShare shr,
int dialect)
Construct an SMB print session
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
isClosed()
Determine if the print session has been closed.
|
abstract SMBFile |
OpenSpoolFile(String id,
int mode,
int setuplen)
Open a spool file on the remote print server.
|
SMBOutputStream |
OpenSpoolStream(String id,
int mode,
int setuplen)
Open a spool file as an output stream.
|
allocatePacket, CloseSession, disableSMBSigning, enableSMBSigning, getCapabilities, getDefaultFlags, getDefaultFlags2, getDeviceType, getDialect, getDialectString, getDomain, getEncryptionKey, getLANManagerType, getMaximumMultiplexedRequests, getMaximumPacketSize, getMaximumVirtualCircuits, getNextMultiplexId, getNextSessionId, getOperatingSystem, getPassword, getPCShare, getProcessId, getSecurityMode, getServer, getSession, getSessionId, getShareName, getSMBSequence, getTreeId, getUserId, getUserName, hasActiveTransaction, hasDataAvailable, hasDebug, hasDebugOption, hasEncryptionKey, hasSMBSigning, isActive, isGuest, isUnicode, pingServer, pingServer, processAsynchResponse, setCapabilities, setDebug, setDefaultFlags, setDefaultFlags2, setDeviceType, setDialect, setDialectString, setDomain, setEncryptionKey, setGuest, setLANManagerType, setMaximumMultiplexedRequests, setMaximumPacketSize, setMaximumVirtualCircuits, setOperatingSystem, setPassword, setProcessId, setSecurityMode, setServer, setSession, setShareName, setSMBSequence, setTransactionMID, setTreeId, setUserId, setUserName, signTxPacket, supportsLargeFiles, supportsLevel2Oplocks, supportsLockAndRead, supportsNTFind, supportsNTSmbs, supportsNTStatusCodes, supportsRawMode, supportsRPCAPIs, supportsUnicode, toString, verifyRxPacket
public static final int TextMode
public static final int GraphicsMode
public static final int DefaultEntryCount
protected PrintSession(PCShare shr, int dialect)
shr
- Remote server detailsdialect
- SMB dialect that this session is usingprotected final boolean isClosed()
public abstract SMBFile OpenSpoolFile(String id, int mode, int setuplen) throws IOException, SMBException
id
- Identifier string for this print request.mode
- Print mode, either TextMode or GraphicsMode.setuplen
- Length of data in the start of the spool file that is printer setup code.IOException
- If an I/O error occurs.SMBException
- If an SMB level error occurspublic SMBOutputStream OpenSpoolStream(String id, int mode, int setuplen) throws IOException, SMBException
id
- Identifier string for this print request.mode
- Print mode, either TextMode or GraphicsMode.setuplen
- Length of data in the start of the spool file that is printer setup code.IOException
- If an I/O error occurs.SMBException
- If an SMB level error occursCopyright © 2005–2017 Alfresco Software. All rights reserved.