Class SimpleIdentity
- java.lang.Object
-
- org.objectweb.joram.shared.security.Identity
-
- org.objectweb.joram.shared.security.SimpleIdentity
-
- All Implemented Interfaces:
Streamable,Externalizable,Serializable
public class SimpleIdentity extends Identity
Default identity class for authentication through user and password.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SimpleIdentity()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheck(Identity identity)check the identity.StringgetUserName()Get the user name.voidreadFrom(InputStream is)The object implements the readFrom method to restore its contents from the input stream.voidsetIdentity(String user, String passwd)set the identity.voidsetUserName(String userName)set user name.StringtoString()voidwriteTo(OutputStream os)The object implements the writeTo method to write its contents to the output stream.-
Methods inherited from class org.objectweb.joram.shared.security.Identity
getRootIdentityClass, getRootName, read, readExternal, write, writeExternal
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
Define serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
user
private String user
-
passwd
private String passwd
-
-
Method Detail
-
getUserName
public String getUserName()
Description copied from class:IdentityGet the user name.- Specified by:
getUserNamein classIdentity- Returns:
- username.
-
setUserName
public void setUserName(String userName)
Description copied from class:Identityset user name.- Specified by:
setUserNamein classIdentity
-
setIdentity
public void setIdentity(String user, String passwd) throws Exception
Description copied from class:Identityset the identity.- Specified by:
setIdentityin classIdentity- Throws:
Exception
-
check
public boolean check(Identity identity) throws Exception
Description copied from class:Identitycheck the identity.
-
readFrom
public void readFrom(InputStream is) throws IOException
Description copied from interface:StreamableThe object implements the readFrom method to restore its contents from the input stream.- Parameters:
is- the stream to read data from in order to restore the object- Throws:
IOException- an error occurs during IO operation.
-
writeTo
public void writeTo(OutputStream os) throws IOException
Description copied from interface:StreamableThe object implements the writeTo method to write its contents to the output stream.- Parameters:
os- the stream to write the object to- Throws:
IOException- an error occurs during IO operation.
-
-