| Constructor and Description |
|---|
PreSharedKeyIdentity(String identity)
Creates a new instance for an identity.
|
PreSharedKeyIdentity(String virtualHost,
String identity)
Creates a new instance for an identity scoped to a virtual host.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Compares another object to this identity.
|
String |
getIdentity()
Gets the identity.
|
String |
getName()
Gets the name of this principal.
|
String |
getVirtualHost()
Gets the virtual host name that the identity is scoped to.
|
int |
hashCode() |
boolean |
isScopedIdentity()
Checks, if the identity is scoped by the virtual host name.
|
String |
toString()
Gets a string representation of this principal.
|
public PreSharedKeyIdentity(String identity)
identity - the identityNullPointerException - if the identity is nullpublic PreSharedKeyIdentity(String virtualHost, String identity)
virtualHost - The virtual host name that the identity is scoped to.
The host name will be converted to lower case.identity - the identity.NullPointerException - if the identity is nullIllegalArgumentException - if virtual host is not a valid host name
as per RFC 1123.public boolean isScopedIdentity()
true, if the identity is scoped by the virtual host name.public String getVirtualHost()
null if not set.public String getIdentity()
public String getName()
If the identity is not scoped by the server name, the
getIdentity() is returned. If the identity is scoped by the
server name, the name consists of that server name and the identity,
separated by a colon character. If no server name has been provided, then
the name consists of a colon character followed by the identity.
public String toString()
public int hashCode()
Copyright © 2019 Eclipse Foundation. All rights reserved.