|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object iaik.security.ssl.chb.ChannelBindings
public class ChannelBindings
This class represents a list of ChannelBindings.
Currently two channel bindings are implemented according to RFC 5929:
An application that is interested to capture some particular channel binding value(s) has to announce its interest byadding
a list of channel bindings to the SSLContext object, e.g.:
ChannelBindings channelBindings = new ChannelBindings(); channelBindings.addChannelBinding(new TLSUniqueChannelBinding()); channelBindings.addChannelBinding(new TLSServerEndPointChannelBinding()); context.setChannelBindings(channelBindings);After having completed the handshake the channel binding values can be
obtained
from the SSLSocket:
ChannelBindings chBndgs = socket.getChannelBindings(); if (chBndgs != null) { TLSUniqueChannelBinding tlsUnique = (TLSUniqueChannelBinding)chBndgs.getChannelBinding(TLSUniqueChannelBinding.TYPE); if (tlsUnique != null) { System.out.println("tls-unique: " + Util.toString(tlsUnique.getData())); } TLSServerEndPointChannelBinding tlsServerEndPoint = (TLSServerEndPointChannelBinding)chBndgs.getChannelBinding(TLSServerEndPointChannelBinding.TYPE); if (tlsServerEndPoint != null) { System.out.println("tls-server-end-point: " + Util.toString(tlsServerEndPoint.getData())); } }
ChannelBinding
,
ChannelBindingType
,
TLSUniqueChannelBinding
,
TLSServerEndPointChannelBinding
Constructor Summary | |
---|---|
ChannelBindings()
Default Constructor. |
|
ChannelBindings(ChannelBinding[] channelBindings)
Creates an ChannelBindings for the given ChannelBindings. |
Method Summary | |
---|---|
ChannelBinding |
addChannelBinding(ChannelBinding channelBinding)
Adds an ChannelBinding to this ChannelBindings. |
java.lang.Object |
clone()
Gets a clone of this ChannelBinding. |
boolean |
containsChannelBinding(ChannelBindingType channelBindingType)
Checks whether a ChannelBinding of the given type is included. |
int |
countChannelBindings()
Gets the number of ChannelBinding objects included in this ChannelBindings. |
ChannelBinding |
getChannelBinding(ChannelBindingType channelBindingType)
Gets a particular ChannelBinding, specified by its type. |
java.util.List |
getChannelBindingTypes()
Gets list containing the types of the ChannelBinding objects contained in this ChannelBindings. |
boolean |
hasChannelBindings()
Checks, if there are any ChannelBinding objects included in this ChannelBindings. |
java.util.List |
listChannelBindings()
Returns a List of all ChannelBinding objects included in this ChannelBindings. |
void |
removeAllChannelBindings()
Removes all ChannelBindings currently included in this ChannelBindings. |
ChannelBinding |
removeChannelBinding(ChannelBindingType channelBindingType)
Removes an ChannelBinding, identified by its type. |
java.lang.String |
toString()
Gets a string that represents the contents of the ChannelBindings. |
java.lang.String |
toString(boolean detailed)
Gets a string that represents the contents of the ChannelBindings. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ChannelBindings()
ChannelBindings
list.
Use method addChannelBinding
to add ChannelBindings to the list.
public ChannelBindings(ChannelBinding[] channelBindings)
channelBindings
- the ChannelBindings for this ChannelBindings listMethod Detail |
---|
public ChannelBinding addChannelBinding(ChannelBinding channelBinding)
channelBinding
- the ChannelBinding to be added
null
if there has yet not been included any
ChannelBinding with the same type
java.lang.NullPointerException
- if the given ChannelBinding is null
public ChannelBinding removeChannelBinding(ChannelBindingType channelBindingType)
channelBindingType
- the type of the ChannelBinding to be removed
null
if no ChannelBinding with the given type
was includedpublic void removeAllChannelBindings()
public java.util.List listChannelBindings()
public boolean hasChannelBindings()
true
if there are ChannelBinding objects included,
false
if notpublic int countChannelBindings()
public ChannelBinding getChannelBinding(ChannelBindingType channelBindingType)
channelBindingType
- the type of the ChannelBinding
null
if no ChannelBinding
with the given type is included in this ChannelBindingspublic boolean containsChannelBinding(ChannelBindingType channelBindingType)
channelBindingType
- the type of the ChannelBinding
true
if a ChannelBinding of the given type is
included, false
if it is not includedpublic java.util.List getChannelBindingTypes()
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(boolean detailed)
detailed
- true
to include the contents of the ChannelBindings
false
to only dump the ChannelBinding types
|
This Javadoc may contain text parts from text parts from IETF Internet Standard specifications (see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |