|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opcfoundation.ua.utils.bytebuffer.ByteBufferFactory
org.opcfoundation.ua.transport.tcp.impl.ChunkFactory
public class ChunkFactory
Chunk factory constructs byte buffers to be used for writing. The byte buffer will be backed by an array that can fit the chunk. The writable portion of the byte buffer (position -> limit) reflects to writable plaintext region.
Padding and the size of the message is pre-written to the chunk.
| Nested Class Summary | |
|---|---|
static class |
ChunkFactory.AcknowledgeChunkFactory
|
static class |
ChunkFactory.AsymmMsgChunkFactory
|
static class |
ChunkFactory.ErrorMessageChunkFactory
|
static class |
ChunkFactory.HelloChunkFactory
|
| Field Summary | |
|---|---|
int |
cipherBlockSize
|
int |
maxChunkSize
|
int |
maxPlaintextSize
|
int |
messageHeaderSize
|
int |
securityHeader
|
MessageSecurityMode |
securityMode
|
int |
sequenceHeader
|
int |
signatureSize
|
| Fields inherited from class org.opcfoundation.ua.utils.bytebuffer.ByteBufferFactory |
|---|
BIG_ENDIAN_HEAP_BYTEBUFFER_FACTORY, DEFAULT_ENDIAN_HEAP_BYTEBUFFER_FACTORY, LITTLE_ENDIAN_HEAP_BYTEBUFFER_FACTORY |
| Constructor Summary | |
|---|---|
ChunkFactory(int maxChunkSize,
int messageHeaderSize,
int securityHeaderSize,
int sequenceHeaderSize,
int signatureSize,
int cipherBlockSize,
MessageSecurityMode securityMode,
int keySize)
Constructor for ChunkFactory. |
|
| Method Summary | |
|---|---|
ByteBuffer |
allocate(int bodySize)
allocate. |
void |
encryptChunk(ByteBuffer chunk)
encryptChunk. |
ByteBuffer |
expandToCompleteChunk(ByteBuffer plaintext)
Expand allocated bytebuffer to complete chunk. |
ByteBuffer[] |
expandToCompleteChunk(ByteBuffer[] plaintexts)
expandToCompleteChunk. |
protected int |
getMinimumPadding()
getMinimumPadding. |
void |
signChunk(ByteBuffer chunk)
signChunk. |
protected void |
writePadding(int paddingPosition,
int padding,
ByteBuffer result)
writePadding. |
protected void |
writePaddingSize(int paddingPosition,
int paddingSize,
ByteBuffer result)
writePaddingSize. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public int maxChunkSize
public int maxPlaintextSize
public int messageHeaderSize
public int securityHeader
public int sequenceHeader
public int cipherBlockSize
public int signatureSize
public MessageSecurityMode securityMode
| Constructor Detail |
|---|
public ChunkFactory(int maxChunkSize,
int messageHeaderSize,
int securityHeaderSize,
int sequenceHeaderSize,
int signatureSize,
int cipherBlockSize,
MessageSecurityMode securityMode,
int keySize)
Constructor for ChunkFactory.
maxChunkSize - a int.messageHeaderSize - a int.securityHeaderSize - a int.sequenceHeaderSize - a int.signatureSize - a int.cipherBlockSize - a int.securityMode - a MessageSecurityMode object.keySize - a int.| Method Detail |
|---|
protected int getMinimumPadding()
getMinimumPadding.
public ByteBuffer allocate(int bodySize)
allocate.
Allocate chunk for a message with a given body size.
allocate in class ByteBufferFactorybodySize - a int.
ByteBuffer object.
protected void writePadding(int paddingPosition,
int padding,
ByteBuffer result)
writePadding.
paddingPosition - a int.paddingPosition - padding - the size of the whole padding; padding, padding fill, extra padding byteresult - a ByteBuffer object.
protected void writePaddingSize(int paddingPosition,
int paddingSize,
ByteBuffer result)
writePaddingSize.
paddingPosition - a int.paddingSize - a int.result - a ByteBuffer object.public void signChunk(ByteBuffer chunk)
signChunk.
chunk - a ByteBuffer object.public void encryptChunk(ByteBuffer chunk)
encryptChunk.
chunk - a ByteBuffer object.public ByteBuffer expandToCompleteChunk(ByteBuffer plaintext)
plaintext - a ByteBuffer object.
public ByteBuffer[] expandToCompleteChunk(ByteBuffer[] plaintexts)
expandToCompleteChunk.
plaintexts - an array of ByteBuffer objects.
ByteBuffer objects.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||