public abstract class Identity extends Object implements Externalizable, Streamable
Modifier and Type | Field and Description |
---|---|
static org.objectweb.util.monolog.api.Logger |
logger |
private static String |
SEPARATE_CHAR
separate identity class name and root name.
|
Constructor and Description |
---|
Identity()
Constructs an
Identity . |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
check(Identity identity)
check the identity.
|
static String |
getRootIdentityClass(String rootName) |
static String |
getRootName(String rootName) |
abstract String |
getUserName()
Get the user name.
|
static Identity |
read(InputStream is) |
void |
readExternal(ObjectInput in) |
abstract void |
setIdentity(String user,
String passwd)
set the identity.
|
abstract void |
setUserName(String userName)
set user name.
|
static void |
write(Identity identity,
OutputStream os)
***** ***** ***** ***** ***** ***** *****
Streamable interface
***** ***** ***** ***** ***** ***** ***** *****
|
void |
writeExternal(ObjectOutput out)
***** ***** ***** ***** ***** ***** *****
Externalizable interface
***** ***** ***** ***** ***** ***** ***** *****
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
readFrom, writeTo
public static org.objectweb.util.monolog.api.Logger logger
private static final String SEPARATE_CHAR
public abstract String getUserName()
public abstract void setUserName(String userName)
userName
- public abstract void setIdentity(String user, String passwd) throws Exception
user
- passwd
- Exception
public abstract boolean check(Identity identity) throws Exception
identity
- the identity to checkException
- the exceptionpublic static String getRootIdentityClass(String rootName)
rootName
- public static String getRootName(String rootName)
rootName
- public final void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public final void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public static void write(Identity identity, OutputStream os) throws IOException
IOException
public static Identity read(InputStream is) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException
Copyright © 2021 ScalAgent D.T.. All rights reserved.