com.sun.jini.discovery.internal
Class X500Provider.SigningBufferFactory
java.lang.Object
com.sun.jini.discovery.internal.X500Provider.SigningBufferFactory
- All Implemented Interfaces:
- DatagramBufferFactory
- Enclosing class:
- X500Provider
class X500Provider.SigningBufferFactory
- extends Object
- implements DatagramBufferFactory
Buffer factory which signs data written into the buffers it dispenses.
Method Summary |
ByteBuffer |
newBuffer()
Returns a byte buffer into which to write encoded multicast packet data. |
void |
sign()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
buffers
private final List buffers
factory
private final DatagramBufferFactory factory
principalName
private final byte[] principalName
signature
private final Signature signature
X500Provider.SigningBufferFactory
X500Provider.SigningBufferFactory(DatagramBufferFactory factory,
X500PrivateCredential cred)
throws InvalidKeyException,
UTFDataFormatException,
NoSuchAlgorithmException
- Throws:
InvalidKeyException
UTFDataFormatException
NoSuchAlgorithmException
newBuffer
public ByteBuffer newBuffer()
- Description copied from interface:
DatagramBufferFactory
- Returns a byte buffer into which to write encoded multicast packet data.
The buffer encompasses all of the data for the packet to be sent: buffer
offset
0
corresponds to the start of packet data, and the
capacity of the buffer indicates the maximum packet size. Encoding
methods should start writing data at the initial (non-zero) position of
the buffer; the final position of the buffer after the encoding method
has returned is used to mark the end of encoded data, which translates
into the actual length of the sent packet.
- Specified by:
newBuffer
in interface DatagramBufferFactory
- Returns:
- a buffer into which to write encoded multicast packet data
sign
public void sign()
throws SignatureException
- Throws:
SignatureException
Copyright 2007-2010, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.