public abstract class AS400Servlet extends AuthenticationServlet
A connection pool can be used to share connections and manage the number of connections a servlet user can have to the system. 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 and Description |
---|
AS400Servlet()
Constructs a default AS400Servlet object.
|
AS400Servlet(boolean useConnectionPool)
Constructs an AS400Servlet object specifing whether to use the connection pool.
|
Modifier and Type | Method and Description |
---|---|
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 object representing the system.
|
AS400 |
getSystem(int service)
Returns an object representing the system.
|
AS400 |
getSystem(java.lang.String systemName)
Returns an object representing the system.
|
AS400 |
getSystem(java.lang.String systemName,
int service)
Returns an object representing the system.
|
AS400 |
getSystem(java.lang.String systemName,
java.lang.String userId,
char[] password)
Returns an object representing the system.
|
AS400 |
getSystem(java.lang.String systemName,
java.lang.String userId,
java.lang.String password)
Deprecated.
Use getSystem(String systemName, String userId, char[] password) instead.
|
AS400 |
getSystem(java.lang.String systemName,
java.lang.String userId,
java.lang.String password,
int service)
Returns an object representing the system.
|
boolean |
isUseConnectionPool()
Indicates if the connection pool is being used.
|
void |
returnSystem(AS400 system)
Return the system 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.
|
bypassAuthentication, getLog, getRealm, getUser, init, log, log, postValidation, service, setLog, setPassword, setRealm, setUser
doDelete, doGet, doOptions, doPost, doPut, doTrace, getLastModified, service
public AS400Servlet()
public AS400Servlet(boolean useConnectionPool)
useConnectionPool
- true if using connection pool; false otherwise.public void destroy()
destroy
in interface javax.servlet.Servlet
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 system.ConnectionPoolException
- If a connection pool error occurs.public AS400 getSystem(int service) throws AS400SecurityException, java.io.IOException, ConnectionPoolException
service
- The name of the service.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.ConnectionPoolException
- If a connection pool error occurs.public AS400 getSystem(java.lang.String systemName, int service) throws AS400SecurityException, java.io.IOException, ConnectionPoolException
systemName
- The name of the system.service
- The name of the service.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.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 system.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, char[] password) throws ConnectionPoolException
systemName
- The name of the system.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 system.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 service.AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.ConnectionPoolException
- If a connection pool error occurs.public boolean isUseConnectionPool()
public void setDocumentEnd(java.lang.String end)
end
- The end tags.public void setDocumentHead(java.lang.String head)
head
- The starting tags.public void setUseConnectionPool(boolean useConnectionPool)
useConnectionPool
- true if using connection pool; false otherwise.AS400ConnectionPool
public void returnSystem(AS400 system)
system
- The 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.