public class TransactBuffer
extends java.lang.Object
Contains the parameters and data for a transaction, transaction2 or NT transaction request.
Modifier and Type | Field and Description |
---|---|
protected static int |
DefaultDataSize |
protected static int |
DefaultMaxDataReturn |
protected static int |
DefaultMaxParameterReturn |
protected static int |
DefaultMaxSetupReturn |
protected static int |
DefaultParameterSize |
protected static int |
DefaultSetupSize |
protected DataBuffer |
m_dataBuf |
protected int |
m_func |
protected int |
m_maxData |
protected int |
m_maxParam |
protected int |
m_maxSetup |
protected boolean |
m_multi |
protected java.lang.String |
m_name |
protected DataBuffer |
m_paramBuf |
protected DataBuffer |
m_setupBuf |
protected int |
m_treeId |
protected int |
m_type |
protected boolean |
m_unicode |
Constructor and Description |
---|
TransactBuffer()
Default constructor
|
TransactBuffer(int scnt,
int pcnt,
int dcnt)
Class constructor
|
TransactBuffer(int func,
int scnt,
int pcnt,
byte[] dbuf,
int doff,
int dlen)
Class constructor
|
TransactBuffer(int cmd,
int scnt,
int pcnt,
int dcnt)
Class constructor
|
TransactBuffer(int func,
java.lang.String name,
int scnt,
int pcnt,
int dcnt)
Class constructor
|
Modifier and Type | Method and Description |
---|---|
void |
appendData(byte[] buf,
int off,
int len)
Append data to the data buffer
|
void |
appendParameter(byte[] buf,
int off,
int len)
Append parameter data to the parameter data buffer
|
void |
appendSetup(byte[] buf,
int off,
int len)
Append setup data to the setup data buffer
|
DataBuffer |
getDataBuffer()
Return the data buffer
|
int |
getFunction()
Return the transaction function
|
java.lang.String |
getName()
Return the transaction name
|
DataBuffer |
getParameterBuffer()
Return the parameter buffer
|
int |
getReturnDataLimit()
Return the data return data limit
|
int |
getReturnParameterLimit()
Return the parameter return data limit
|
int |
getReturnSetupLimit()
Return the setup return data limit
|
DataBuffer |
getSetupBuffer()
Return the setup parameter buffer
|
int |
getTreeId()
Return the tree id
|
boolean |
hasDataBuffer()
Determine if the transaction buffer has a data block
|
boolean |
hasName()
Determine if the transaction has a name
|
boolean |
hasParameterBuffer()
Determine if the transaction buffer has parameter data
|
boolean |
hasSetupBuffer()
Determine if the transaction buffer has setup data
|
boolean |
hasTreeId()
Determine if the tree id has been set
|
boolean |
isMultiPacket()
Determine if this is a multi-packet transaction
|
int |
isType()
Return the transaction type (from SBMSrvPacketType, either Transaction, Transaction2 or NTTransact)
|
boolean |
isUnicode()
Determine if the client is using Unicode strings
|
void |
setEndOfBuffer()
Set the end of buffer positions for the setup, parameter and data buffers ready for reading the
data.
|
void |
setFunction(int func)
Set the transaction function
|
void |
setName(java.lang.String name)
Set the transaction name, for Transactin2
|
void |
setReturnDataLimit(int limit)
Set the limit of returned data bytes
|
void |
setReturnLimits(int slimit,
int plimit,
int dlimit)
Set the setup, parameter and data return data limits
|
void |
setReturnParameterLimit(int limit)
Set the limit of returned parameter bytes
|
void |
setReturnSetupLimit(int limit)
Set the limit of returned setup bytes
|
void |
setTreeId(int tid)
Set the tree id
|
void |
setType(int typ)
Set the transaction type
|
void |
setUnicode(boolean uni)
Set the Unicode strings flag
|
java.lang.String |
toString()
Return the transaction buffer details as a string
|
protected static final int DefaultSetupSize
protected static final int DefaultDataSize
protected static final int DefaultParameterSize
protected static final int DefaultMaxSetupReturn
protected static final int DefaultMaxParameterReturn
protected static final int DefaultMaxDataReturn
protected int m_treeId
protected int m_type
protected int m_func
protected java.lang.String m_name
protected DataBuffer m_setupBuf
protected DataBuffer m_paramBuf
protected DataBuffer m_dataBuf
protected boolean m_multi
protected boolean m_unicode
protected int m_maxSetup
protected int m_maxParam
protected int m_maxData
public TransactBuffer()
public TransactBuffer(int scnt, int pcnt, int dcnt)
scnt
- intpcnt
- intdcnt
- intpublic TransactBuffer(int cmd, int scnt, int pcnt, int dcnt)
cmd
- intscnt
- intpcnt
- intdcnt
- intpublic TransactBuffer(int func, java.lang.String name, int scnt, int pcnt, int dcnt)
func
- intname
- Stringscnt
- intpcnt
- intdcnt
- intpublic TransactBuffer(int func, int scnt, int pcnt, byte[] dbuf, int doff, int dlen)
func
- intscnt
- intpcnt
- intdbuf
- byte[]doff
- intdlen
- intpublic final boolean hasTreeId()
public final int getTreeId()
public final int isType()
public final int getFunction()
public final boolean hasName()
public final java.lang.String getName()
public final boolean isMultiPacket()
public final boolean isUnicode()
public final boolean hasSetupBuffer()
public final DataBuffer getSetupBuffer()
public final boolean hasParameterBuffer()
public final DataBuffer getParameterBuffer()
public final boolean hasDataBuffer()
public final DataBuffer getDataBuffer()
public final int getReturnSetupLimit()
public final int getReturnParameterLimit()
public final int getReturnDataLimit()
public final void setTreeId(int tid)
tid
- intpublic final void setType(int typ)
typ
- intpublic final void setFunction(int func)
func
- intpublic final void setName(java.lang.String name)
name
- Stringpublic final void setUnicode(boolean uni)
uni
- booleanpublic final void setReturnSetupLimit(int limit)
limit
- intpublic final void setReturnParameterLimit(int limit)
limit
- intpublic final void setReturnDataLimit(int limit)
limit
- intpublic final void setReturnLimits(int slimit, int plimit, int dlimit)
slimit
- intplimit
- intdlimit
- intpublic final void setEndOfBuffer()
public final void appendSetup(byte[] buf, int off, int len)
buf
- byte[]off
- intlen
- intpublic final void appendParameter(byte[] buf, int off, int len)
buf
- byte[]off
- intlen
- intpublic final void appendData(byte[] buf, int off, int len)
buf
- byte[]off
- intlen
- intpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.