public final class ServerMinPrincipal extends Object implements InvocationConstraint, Serializable
The use of an instance of this class does not imply directly a
ServerAuthentication.YES constraint; that must be specified
separately to ensure that the server actually authenticates itself.
Because this constraint is conditional on server authentication, it does
not conflict with ServerAuthentication.NO.
It is important to understand that specifying
ServerAuthentication.YES as a requirement does not
ensure that a server is to be trusted; it does ensure that the
server authenticates itself as someone, but it does not ensure that the
server authenticates itself as anyone in particular. Without knowing who
the server authenticated itself as, there is no basis for actually
trusting the server. The client generally needs to specify a
ServerMinPrincipal requirement in addition, or else verify
that the server has specified a satisfactory
ServerMinPrincipal requirement for each of the methods that
the client cares about.
ServerAuthentication,
AuthenticationPermission,
Serialized Form| Constructor and Description |
|---|
ServerMinPrincipal(AtomicSerial.GetArg arg) |
ServerMinPrincipal(Collection c)
Creates a constraint containing the specified principals, with
duplicates removed.
|
ServerMinPrincipal(Principal p)
Creates a constraint containing the specified principal.
|
ServerMinPrincipal(Principal[] principals)
Creates a constraint containing the specified principals, with
duplicates removed.
|
| Modifier and Type | Method and Description |
|---|---|
Set |
elements()
Returns an immutable set of all of the principals.
|
boolean |
equals(Object obj)
Two instances of this class are equal if they have the same principals
(ignoring order).
|
int |
hashCode()
Returns a hash code value for this object.
|
String |
toString()
Returns a string representation of this object.
|
public ServerMinPrincipal(AtomicSerial.GetArg arg) throws IOException
IOExceptionpublic ServerMinPrincipal(Principal p)
p - the principalNullPointerException - if the argument is nullpublic ServerMinPrincipal(Principal[] principals)
principals - the principalsNullPointerException - if the argument is null or
any element is nullIllegalArgumentException - if the argument is emptypublic ServerMinPrincipal(Collection c)
c - the principalsNullPointerException - if the argument is null or
any element is nullIllegalArgumentException - if the argument is empty or the
elements do not all implement the Principal interfacepublic Set elements()
UnsupportedOperationException being
thrown.public int hashCode()
public boolean equals(Object obj)
Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.