public final class ClientMaxPrincipalType extends Object implements InvocationConstraint, Serializable
The use of an instance of this class does not directly imply a
ClientAuthentication.YES
constraint; that must be specified
separately to ensure that the client actually authenticates itself.
Because this constraint is conditional on client authentication, it does
not conflict with ClientAuthentication.NO
.
ClientAuthentication
,
ClientMaxPrincipal
,
ClientMinPrincipal
,
ClientMinPrincipalType
,
AuthenticationPermission
,
Serialized FormModifier and Type | Field and Description |
---|---|
private Class[] |
classes
The classes.
|
private static ObjectStreamField[] |
serialPersistentFields |
private static long |
serialVersionUID |
Constructor and Description |
---|
ClientMaxPrincipalType(Class clazz)
Creates a constraint containing the specified class.
|
ClientMaxPrincipalType(Class[] classes)
Creates a constraint containing the specified classes, with redundant
classes removed.
|
ClientMaxPrincipalType(Collection c)
Creates a constraint containing the specified classes, with redundant
classes removed.
|
Modifier and Type | Method and Description |
---|---|
Set |
elements()
Returns an immutable set of all of the classes.
|
boolean |
equals(Object obj)
Two instances of this class are equal if they have the same classes
(ignoring order).
|
int |
hashCode()
Returns a hash code value for this object.
|
private void |
readObject(ObjectInputStream s)
Verifies that there is at least one class, that none of the classes
is
null , primitive types, array types, or
final classes that do not have Principal as
a superinterface, and that no class is assignable to any other class. |
String |
toString()
Returns a string representation of this object.
|
private static final long serialVersionUID
private static final ObjectStreamField[] serialPersistentFields
private final Class[] classes
public ClientMaxPrincipalType(Class clazz)
clazz
- the classNullPointerException
- if the argument is null
IllegalArgumentException
- if the argument is a primitive type,
an array type, or a final
class that does not have
Principal
as a superinterfacepublic ClientMaxPrincipalType(Class[] classes)
c1
and c2
, if
c1.isAssignableFrom(c2)
is true
, then
c2
is removed. That is, duplicates and subtypes are
removed. The argument passed to the constructor is neither modified
nor retained; subsequent changes to that argument have no effect on
the instance created.classes
- the classesIllegalArgumentException
- if the argument is empty, or if any
element is a primitive type, an array type, or a final
class that does not have Principal
as a
superinterfaceNullPointerException
- if the argument is null
or
any element is null
public ClientMaxPrincipalType(Collection c)
c1
and c2
, if
c1.isAssignableFrom(c2)
is true
, then
c2
is removed. That is, duplicates and subtypes are
removed. The argument passed to the constructor is neither modified
nor retained; subsequent changes to that argument have no effect on
the instance created.c
- the classesIllegalArgumentException
- if the argument is empty, or if any
element is not a Class
, or is a primitive type, an array
type, or a final
class that does not have
Principal
as a superinterfaceNullPointerException
- if the argument is null
or
any element is null
public Set elements()
UnsupportedOperationException
being thrown.public int hashCode()
public boolean equals(Object obj)
public String toString()
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
null
, primitive types, array types, or
final
classes that do not have Principal
as
a superinterface, and that no class is assignable to any other class.InvalidObjectException
- if there are no classes, or
any class is null
, a primitive type, array type, or
final
class that does not have Principal
as
a superinterface, or if any class is assignable to any other classIOException
ClassNotFoundException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.