|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.GenericServlet | +--javax.servlet.http.HttpServlet | +--com.ibm.as400.util.servlet.AuthenticationServlet | +--com.ibm.as400.util.servlet.AS400Servlet
The AS400Servlet class is an abstract class that represents an HTML Servlet.
A connection pool can be used to share connections and manage the number of connections a servlet user can have to the AS/400. When using connection pooling and a system is requested, a fully functional AS400 object is returned to the calling application. It is then up to the application to return the AS400 object to the pool. It is not recommended that an application use this object to create additional connections as the pool would not keep track of these connections.
Constructor Summary | |
AS400Servlet()
Constructs a default AS400Servlet object. |
|
AS400Servlet(boolean useConnectionPool)
Constructs an AS400Servlet object specifing whether to use the connection pool. |
Method Summary | |
void |
destroy()
Close the connection pool. |
AS400ConnectionPool |
getConnectionPool()
Returns the connection pool. |
java.lang.String |
getDocumentEnd()
Returns the tag containing the servlet ending. |
java.lang.String |
getDocumentHead()
Returns the tag containing the servlet head. |
AS400 |
getSystem()
Returns an AS400 object. |
AS400 |
getSystem(int service)
Returns an AS400 object. |
AS400 |
getSystem(java.lang.String systemName)
Returns an AS400 object. |
AS400 |
getSystem(java.lang.String system,
int service)
Returns an AS400 object. |
AS400 |
getSystem(java.lang.String systemName,
java.lang.String userId,
java.lang.String password)
Constructs an AS400 object. |
AS400 |
getSystem(java.lang.String systemName,
java.lang.String userId,
java.lang.String password,
int service)
Constructs an AS400 object. |
boolean |
isUseConnectionPool()
Indicates if the connection pool is being used. |
void |
returnSystem(AS400 system)
Return the AS400 object to the pool when connection pooling is being used. |
void |
setDocumentEnd(java.lang.String end)
Set the html document end tags. |
void |
setDocumentHead(java.lang.String head)
Sets the html document starting tags. |
void |
setUseConnectionPool(boolean useConnectionPool)
Sets the AS400Servlet to use the connection pool. |
boolean |
validateAuthority(java.lang.String realm,
java.lang.String uid,
java.lang.String pw)
Method used to validate authority. |
Methods inherited from class com.ibm.as400.util.servlet.AuthenticationServlet |
bypassAuthentication, getLog, getRealm, getUser, init, log, log, postValidation, service, setLog, setPassword, setRealm, setUser |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, init, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AS400Servlet()
public AS400Servlet(boolean useConnectionPool)
useConnectionPool
- true if using connection pool; false otherwise.Method Detail |
public void destroy()
destroy
in class javax.servlet.GenericServlet
public AS400ConnectionPool getConnectionPool()
public java.lang.String getDocumentEnd()
public java.lang.String getDocumentHead()
public AS400 getSystem() throws ConnectionPoolException
ConnectionPoolException
- If a connection pool error occurs.public AS400 getSystem(java.lang.String systemName) throws ConnectionPoolException
systemName
- The name of the AS/400.ConnectionPoolException
- If a connection pool error occurs.public AS400 getSystem(int service) throws AS400SecurityException, java.io.IOException, ConnectionPoolException
service
- The name of the AS/400 service.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the AS/400.ConnectionPoolException
- If a connection pool error occurs.public AS400 getSystem(java.lang.String system, int service) throws AS400SecurityException, java.io.IOException, ConnectionPoolException
system
- The name of the AS400.service
- The name of the AS/400 service.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the AS/400.ConnectionPoolException
- If a connection pool error occurs.public AS400 getSystem(java.lang.String systemName, java.lang.String userId, java.lang.String password) throws ConnectionPoolException
systemName
- The name of the AS/400.userId
- The user ID to use to connect to the system.password
- The password to use to connect to the system.ConnectionPoolException
- If a connection pool error occurs.public AS400 getSystem(java.lang.String systemName, java.lang.String userId, java.lang.String password, int service) throws AS400SecurityException, java.io.IOException, ConnectionPoolException
systemName
- The name of the AS/400.userId
- The user ID to use to connect to the system.password
- The password to use to connect to the system.service
- The name of the AS/400 service.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the AS/400.ConnectionPoolException
- If a connection pool error occurs.public boolean isUseConnectionPool()
public void setDocumentEnd(java.lang.String end)
html
- The end tags.public void setDocumentHead(java.lang.String head)
html
- The starting tags.public void setUseConnectionPool(boolean useConnectionPool)
useConnectionPool
- true if using connection pool; false otherwise.AS400ConnectionPool
public void returnSystem(AS400 system)
system
- The AS400 system object.public final boolean validateAuthority(java.lang.String realm, java.lang.String uid, java.lang.String pw) throws java.lang.SecurityException, java.io.IOException
validateAuthority
in class AuthenticationServlet
realm
- The realm to validate against.uid
- The user ID to use for validation.pw
- The password to use for validation.java.lang.SecurityException
- This exception should be thrown if validation fails.java.io.IOException
- This exception should be thrown if a communication error occurs during validation.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |