|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.esupportail.cas.server.util.log.Debug
org.esupportail.cas.server.util.Server
public abstract class Server
This abstract class implements a generic server class, inherited by DatabaseServer and LDAPServer.
| Field Summary | |
|---|---|
protected static int |
AUTHENTICATE_FAILURE
The result of the authenticate() method on failure (when the server could not be accessed for instance). |
protected static int |
AUTHENTICATE_NOAUTH
The result of the authenticate() method when the user could not be authenticated (but the server was accessed without any problem). |
protected static int |
AUTHENTICATE_SUCCESS
The result of the authenticate() method on success (when the user has been authenticated). |
protected static int |
CONNECT_FAILURE
The error code set by the connect() method when the connection with the server could not be achieved because of a service failure. |
protected static int |
CONNECT_NOAUTH
The error code set by the connect() method when the connection with the server could not be achieved because of the bind information provided (the server responded but refused the connection). |
protected static int |
CONNECT_SUCCESS
The error set by the connect() method on success. |
private int |
connectError
an integer to store the error code of the connect() calls, set by setConnectError(), retrieved by getConnectError(). |
private RedundantHandler |
handler
The handler the server will be used for. |
| Constructor Summary | |
|---|---|
Server(java.lang.Boolean handlerDebug,
RedundantHandler parentHandler,
org.dom4j.Element serverElement)
Constructor. |
|
| Method Summary | |
|---|---|
protected abstract int |
authenticate(java.lang.String username,
java.lang.String password)
Try to authenticate a user. |
protected int |
getConnectError()
Retrieve the error code of the last connect() call. |
protected RedundantHandler |
getHandler()
Get the handler the server will be used by. |
protected java.lang.String |
getServerSubElementContent(org.dom4j.Element serverElement,
java.lang.String elementName,
boolean needed)
Retrieve the content of a server sub-element. |
protected void |
setConnectError(int errCode)
Set the error code of the last connect() call. |
| Methods inherited from class org.esupportail.cas.server.util.log.Debug |
|---|
checkClass, elementDebugValue, isDebug, setDebug, trace, trace, traceBegin, traceEnd, traceEnd, traceEnd, traceThrow |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int AUTHENTICATE_FAILURE
protected static final int AUTHENTICATE_NOAUTH
protected static final int AUTHENTICATE_SUCCESS
protected static final int CONNECT_FAILURE
protected static final int CONNECT_NOAUTH
protected static final int CONNECT_SUCCESS
private int connectError
private RedundantHandler handler
| Constructor Detail |
|---|
public Server(java.lang.Boolean handlerDebug,
RedundantHandler parentHandler,
org.dom4j.Element serverElement)
handlerDebug - debugging modeparentHandler - the handler the server will be used byserverElement - an XML element corresponding to the server configuration| Method Detail |
|---|
protected abstract int authenticate(java.lang.String username,
java.lang.String password)
username - the user's namepassword - the user's password
protected final int getConnectError()
protected final RedundantHandler getHandler()
protected final java.lang.String getServerSubElementContent(org.dom4j.Element serverElement,
java.lang.String elementName,
boolean needed)
throws java.lang.Exception
serverElement - the XML element representing the server in the configurationelementName - the name of the XML element to look forneeded - false if the element can be absent or empty, true otherwise
java.lang.Exception - Exceptionprotected final void setConnectError(int errCode)
errCode - an integer equal to Server.CONNECT_SUCCESS,
Server.CONNECT_NOAUTH or Server.CONNECT_FAILURE.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||