Package org.cristian.t4j
Class TelnetServer.Authenticator
- java.lang.Object
-
- org.cristian.t4j.TelnetServer.Authenticator
-
- Direct Known Subclasses:
TelnetDefaultAuthenticator
- Enclosing class:
- TelnetServer
public abstract static class TelnetServer.Authenticator extends java.lang.Object
Absctract class used as template for authenticators.
-
-
Constructor Summary
Constructors Constructor Description Authenticator(java.io.BufferedReader STDIN, java.io.PrintWriter STDOUT)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
handle()
Executes the authenticator proccess.boolean
isAuthenticated()
Check if the user has been successfully authenticated.protected void
isAuthenticated(boolean Status)
Set the status of the user authentication.abstract TelnetServer.Authenticator
newAuthenticator(java.io.BufferedReader STDIN, java.io.PrintWriter STDOUT)
Make a new authenticator instance.java.lang.String
user()
Get the username of the authenticated user.protected void
user(java.lang.String User)
Set the username of the authenticated user.
-
-
-
Method Detail
-
isAuthenticated
public boolean isAuthenticated()
Check if the user has been successfully authenticated.- Returns:
- True if the user has been authenticated, false otherwise.
-
isAuthenticated
protected void isAuthenticated(boolean Status)
Set the status of the user authentication.- Parameters:
Status
- True if the user has been authenticated, false otherwise.
-
user
public java.lang.String user()
Get the username of the authenticated user.- Returns:
- Username
-
user
protected void user(java.lang.String User)
Set the username of the authenticated user.- Parameters:
User
- Username.
-
newAuthenticator
public abstract TelnetServer.Authenticator newAuthenticator(java.io.BufferedReader STDIN, java.io.PrintWriter STDOUT)
Make a new authenticator instance.- Parameters:
STDIN
- The standard input stream.STDOUT
- The standard output stream.- Returns:
- A new Authenticator instance.
-
handle
public abstract void handle()
Executes the authenticator proccess.
-
-