public class SimpleIdentity extends Identity
Modifier and Type | Field and Description |
---|---|
private String |
passwd |
private static long |
serialVersionUID
Define serialVersionUID for interoperability.
|
private String |
user |
Constructor and Description |
---|
SimpleIdentity() |
Modifier and Type | Method and Description |
---|---|
boolean |
check(Identity identity)
check the identity.
|
String |
getUserName()
Get the user name.
|
void |
readFrom(InputStream is)
The object implements the readFrom method to restore its contents from
the input stream.
|
void |
setIdentity(String user,
String passwd)
set the identity.
|
void |
setUserName(String userName)
set user name.
|
String |
toString() |
void |
writeTo(OutputStream os)
The object implements the writeTo method to write its contents to
the output stream.
|
getRootIdentityClass, getRootName, read, readExternal, write, writeExternal
private static final long serialVersionUID
private String user
private String passwd
public String getUserName()
Identity
getUserName
in class Identity
public void setUserName(String userName)
Identity
setUserName
in class Identity
public void setIdentity(String user, String passwd) throws Exception
Identity
setIdentity
in class Identity
Exception
public boolean check(Identity identity) throws Exception
Identity
public void readFrom(InputStream is) throws IOException
Streamable
is
- the stream to read data from in order to restore the objectIOException
- an error occurs during IO operation.public void writeTo(OutputStream os) throws IOException
Streamable
os
- the stream to write the object toIOException
- an error occurs during IO operation.Copyright © 2022 ScalAgent D.T.. All rights reserved.