public interface AppConnChannel
Modifier and Type | Field and Description |
---|---|
static int |
LOG_ALL_MESSAGES
Used by
getLoggingLevel() and setLoggingLevel(int) . |
static int |
LOG_ERRORS
Used by
getLoggingLevel() and setLoggingLevel(int) . |
static int |
LOG_WARNINGS_AND_ERRORS
Used by
getLoggingLevel() and setLoggingLevel(int) . |
static int |
SessionType3270
Return value from
getSessionType() . |
static int |
SessionType5250
Return value from
getSessionType() . |
static int |
SessionTypeHP
Return value from
getSessionType() . |
static int |
SessionTypeUnknown
Return value from
getSessionType() . |
static int |
SessionTypeVT
Return value from
getSessionType() . |
Modifier and Type | Method and Description |
---|---|
void |
connectToModel(java.lang.String server,
java.lang.String modelName,
java.lang.String userid,
java.lang.String password,
java.util.Map modelVariables)
Establishes a connection to a Host Integrator Server and
creates or allocates a host session with the specified model.
|
void |
connectToModelViaDomain(java.lang.String directoryServer,
java.lang.String domainName,
java.lang.String modelName,
java.lang.String userid,
java.lang.String password,
java.util.Map modelVariables)
Establishes a connection to a Host Integrator Server and
creates or allocates a host session with the specified model.
|
void |
connectToSession(java.lang.String server,
java.lang.String session,
java.lang.String userid,
java.lang.String password,
java.util.Map modelVariables)
Establishes a connection to a Host Integrator Server and
creates or allocates a host session with the specified session pool.
|
void |
connectToSessionViaDomain(java.lang.String directoryServer,
java.lang.String domainName,
java.lang.String session,
java.lang.String userid,
java.lang.String password,
java.util.Map modelVariables)
Establishes a connection to a Host Integrator Server and
creates or allocates a host session with the specified session pool.
|
void |
disconnect()
Disconnects from a Host Integrator Server Session.
|
void |
disconnect(int reserved)
Disconnects from a Host Integrator Server Session.
|
int |
getConnectionTimeout()
Gets the connection timeout for a Host Integrator Server session.
|
int |
getLastRequestID()
Gets an integer identifier for the most recent request
performed against the current Host Integrator Server session.
|
java.util.Locale |
getLocale()
Gets the locale for an AppConn session.
|
int |
getLoggingLevel()
Gets the logging level for the current session of the Host Integrator server.
|
int |
getMajorVersion()
Gets major version number for the AppConn connector.
|
int |
getMethodTimeout()
Gets the method timeout for a Host Integrator Server session.
|
int |
getMinorVersion()
Gets minor version number for the AppConn connector.
|
java.lang.String |
getModelName()
Gets the name of the Host Integrator model for the current session.
|
java.lang.String |
getModelVersionString()
Gets the version of the model.
|
java.lang.String |
getServerName()
Gets the name of the Host Integrator Server for the current session.
|
int |
getSessionID()
Returns an integer representing the session ID
returned during the last connection attempt to the Verastream server.
|
int |
getSessionType()
Gets the terminal emulation type of the host session that is supported by the model specified
in the connect call for this session.
|
java.lang.String |
getVersionString()
Gets version string for the AppConn connector.
|
boolean |
isConnected()
Determines whether the Host Integrator Server session is connected.
|
boolean |
isConnectionSecure()
Determines whether the Host Integrator Server session is using
a secure connection.
|
boolean |
isMetaDataOnly()
Determines whether the Host Integrator Server session is configured to only return
model meta-data for this connection.
|
void |
requireSecureConnection(boolean require)
Requires a secure channel on the next
connection to a Host Integrator Server.
|
void |
resumeConnection(java.lang.String connectionToken)
Resumes the execution of a currently
suspended Host Integrator server session.
|
void |
setConnectionTimeout(int timeout)
Sets the connection timeout for a Host Integrator Server session.
|
void |
setLocale(java.util.Locale locale)
Sets the locale for an AppConn session.
|
void |
setLoggingLevel(int level)
Sets the logging level for the current session of the Host Integrator server.
|
void |
setMetaDataOnly(boolean enable)
Elect to make a metadata-only connection.
|
void |
setMethodTimeout(int timeout)
Sets the method timeout for a Host Integrator Server session.
|
java.lang.String |
suspendConnection(int timeout)
Suspends the execution of a currently
running Host Integrator Server session.
|
void |
suspendConnection(int timeout,
java.lang.String connectionToken)
Suspends the execution of a currently
running Host Integrator Server session.
|
static final int LOG_ERRORS
getLoggingLevel()
and setLoggingLevel(int)
.static final int LOG_WARNINGS_AND_ERRORS
getLoggingLevel()
and setLoggingLevel(int)
.static final int LOG_ALL_MESSAGES
getLoggingLevel()
and setLoggingLevel(int)
.static final int SessionType3270
getSessionType()
.static final int SessionType5250
getSessionType()
.static final int SessionTypeVT
getSessionType()
.static final int SessionTypeHP
getSessionType()
.static final int SessionTypeUnknown
getSessionType()
.void connectToModel(java.lang.String server, java.lang.String modelName, java.lang.String userid, java.lang.String password, java.util.Map modelVariables) throws AppConnException, ApptrieveException
Establishes a connection to a Host Integrator Server and creates or allocates a host session with the specified model.
Reasons for failure include:
The parameters userID and password are used by Host Integrator Server if the security option is ON.
server
- java.lang.String - Name of the Host Integrator Server (DNS Name or IP Address)modelName
- java.lang.String - Name of a Host Integrator modeluserid
- java.lang.String - User ID for authorization on the Host Integrator Serverpassword
- java.lang.String - Password for authorization on the Host Integrator ServermodelVariables
- java.util.Map - Model variables to set on connection (can be null)AppConnException
- if there is a parameter errorApptrieveException
- if a Host Integrator server error occursconnectToSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToModelViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToSessionViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
suspendConnection(int)
,
resumeConnection(java.lang.String)
,
disconnect()
void connectToModelViaDomain(java.lang.String directoryServer, java.lang.String domainName, java.lang.String modelName, java.lang.String userid, java.lang.String password, java.util.Map modelVariables) throws AppConnException, ApptrieveException
Establishes a connection to a Host Integrator Server and creates or allocates a host session with the specified model. The connection is made using the specified AADS Server and Host Integrator Domain.
Reasons for failure include:
The parameters userID and password are used by Host Integrator Server if the security option is ON.
directoryServer
- java.lang.String - Name of the Host Integrator authentication and
authorization directory server (AADS)domainName
- java.lang.String - Name of the Host Integrator domain to connect tomodelName
- java.lang.String - Name of a Host Integrator Modeluserid
- java.lang.String - User ID for authorization on the Host Integrator Serverpassword
- java.lang.String - Password for authorization on the Host Integrator ServermodelVariables
- java.util.Map - model variables to set on connection (can be null)AppConnException
- if there is a parameter errorApptrieveException
- if a Host Integrator server error occursconnectToModel(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToSessionViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
suspendConnection(int)
,
resumeConnection(java.lang.String)
,
disconnect()
void connectToSession(java.lang.String server, java.lang.String session, java.lang.String userid, java.lang.String password, java.util.Map modelVariables) throws AppConnException, ApptrieveException
Establishes a connection to a Host Integrator Server and creates or allocates a host session with the specified session pool.
Reasons for failure include:
The parameters userID and password are used by Host Integrator Server if the security option is enabled.
server
- java.lang.String - Name of the Host Integrator Server (DNS Name or IP Address)session
- java.lang.String - Name of Host Integrator session pooluserid
- java.lang.String - User ID for authorization on the Host Integrator Serverpassword
- java.lang.String - Password for authorization on the Host Integrator ServermodelVariables
- java.util.Map - model variables to set on connection (can be null)AppConnException
- if there is a parameter errorApptrieveException
- if a Host Integrator server error occursconnectToModel(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToModelViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToSessionViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
suspendConnection(int)
,
resumeConnection(java.lang.String)
,
disconnect()
void connectToSessionViaDomain(java.lang.String directoryServer, java.lang.String domainName, java.lang.String session, java.lang.String userid, java.lang.String password, java.util.Map modelVariables) throws AppConnException, ApptrieveException
Establishes a connection to a Host Integrator Server and creates or allocates a host session with the specified session pool. The connection is made using the specified AADS Server and Host Integrator Domain.
Reasons for failure include:
The parameters userID and password are used by Host Integrator Server if the security option is on.
directoryServer
- java.lang.String - Name of the Host Integrator authentication and
authorization directory server (AADS)domainName
- java.lang.String - Name of the Host Integrator domain to connect tosession
- java.lang.String - Name of a Host Integrator session pooluserid
- java.lang.String - User ID for authorization on the Host Integrator Serverpassword
- java.lang.String - Password for authorization on the Host Integrator ServermodelVariables
- java.util.Map - Model variables to set on connection (can be null)AppConnException
- if there is a parameter errorApptrieveException
- if a Host Integrator server error occursconnectToModel(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToModelViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
suspendConnection(int)
,
resumeConnection(java.lang.String)
,
disconnect()
void disconnect()
Disconnects from a Host Integrator Server Session.
Reasons for failure include:
connectToModel(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToModelViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToSessionViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
suspendConnection(int)
,
resumeConnection(java.lang.String)
void disconnect(int reserved)
Disconnects from a Host Integrator Server Session.
Reasons for failure include:
reserved
- int - reserved parameter, should always be set to zeroconnectToModel(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToModelViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToSessionViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
suspendConnection(int)
,
resumeConnection(java.lang.String)
int getLastRequestID()
Gets an integer identifier for the most recent request performed against the current Host Integrator Server session.
If a server request has not yet been performed in the current session, this method returns 0.
MetaDataOnlyException
- if this is a metadata-only connectionjava.util.Locale getLocale()
setLocale(java.util.Locale)
int getLoggingLevel() throws ApptrieveException
Gets the logging level for the current session of the Host Integrator server.
Valid logging levels are:
ApptrieveException
- if a Host Integrator server error occurssetLoggingLevel(int)
int getMajorVersion()
Gets major version number for the AppConn connector.
int getMethodTimeout()
Gets the method timeout for a Host Integrator Server session.
setMethodTimeout(int)
int getConnectionTimeout()
Gets the connection timeout for a Host Integrator Server session.
setConnectionTimeout(int)
int getMinorVersion()
Gets minor version number for the AppConn connector.
java.lang.String getModelName()
If a session is not active, this method returns null.
java.lang.String getServerName()
If a session is not active, this method returns null.
int getSessionID()
MetaDataOnlyException
- if this is a metadata-only connectionjava.lang.String getVersionString()
java.lang.String getModelVersionString()
boolean isConnected()
The return value is true if AppConnSession believes it is currently connected to a Host Integrator server session. This method does not actually perform a server operation to determine whether connection is present. It is possible for the connection to have been lost without the connector detecting it. In this case isConnected() will return true, even though a connection is not present.
connectToModel(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToModelViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToSession(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
connectToSessionViaDomain(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
,
suspendConnection(int)
,
resumeConnection(java.lang.String)
,
disconnect()
boolean isConnectionSecure()
Determines whether the Host Integrator Server session is using a secure connection.
void requireSecureConnection(boolean require)
Requires a secure channel on the next connection to a Host Integrator Server. This method has no effect on the current Host Integrator session if one is already established. If the setting is false, then AppConnChannel does not require a secure connection. In this case, the server security setting takes precedence. If the setting is true, AppConnChannel will force a secure connection, even though the server setting is not set to require a secure channel.
Note: this call affects only subsequent connections to a Host Integrator Server.
require
- boolean - set to true to require a secure connection,
false otherwisevoid resumeConnection(java.lang.String connectionToken) throws ApptrieveException
Resumes the execution of a currently suspended Host Integrator server session. If the requested session is already running, this method does nothing.
Reasons for failure include:
connectionToken
- String - the token received from the suspendConnection methodApptrieveException
- if a Host Integrator server error occursMetaDataOnlyException
- if this is a metadata-only connectionsuspendConnection(int)
void setLocale(java.util.Locale locale) throws ApptrieveException, java.util.MissingResourceException
Sets the locale for an AppConn session.
locale
- Locale - the Locale to use for the AppConn session.ApptrieveException
- if there is a parameter errorjava.util.MissingResourceException
- if the resource file for the locale cannot be foundgetLocale()
void setLoggingLevel(int level) throws ApptrieveException
Sets the logging level for the current session of the Host Integrator server.
This overrides the global logging level for that server and lasts until changed or until disconnection. This is intended primarily for debugging, allowing a larger class of messages to be logged by a single session without required the global logging level to be changed for the Host Integrator server. This method cannot set the logging level to one that is lower than the server's logging level configuration.
Valid logging levels are:
level
- - the logging level to use for the AppConn session.AppConnException
- if there is a parameter errorApptrieveException
- if a Host Integrator server error occursMetaDataOnlyException
- if this is a metadata-only connectiongetLoggingLevel()
void setMethodTimeout(int timeout) throws ApptrieveException
Sets the method timeout for a Host Integrator Server session.
Reasons for failure include:
timeout
- int - The timeout period in millisecondsApptrieveException
- if a Host Integrator server error occursgetMethodTimeout()
void setConnectionTimeout(int timeout)
Sets the connection timeout for a Host Integrator Server session.
This method is useful, for example, if the server is temporarily unable to allow any more sessions, or if the domain load has been reached. Connection attempt information, including the number of connection attempts and the time of those attempts, is written to the log.
The default value is 30 seconds.
timeout
- int - The timeout period in secondsgetConnectionTimeout()
java.lang.String suspendConnection(int timeout) throws ApptrieveException
Suspends the execution of a currently running Host Integrator Server session. On successful suspension, the methods returns a token to be used when resuming the session. If the current session is already suspended, this method does nothing. The suspended session automatically terminates if it is not resumed before the specified timeout period elapses.
Reasons for failure include:
timeout
- int - the timeout value to use for the suspended session in minutes. This value must greater than zero.ApptrieveException
- if a Host Integrator server error occursMetaDataOnlyException
- if this is a metadata-only connectionresumeConnection(java.lang.String)
void suspendConnection(int timeout, java.lang.String connectionToken) throws ApptrieveException
Suspends the execution of a currently running Host Integrator Server session. On successful suspension, the methods returns a token to be used when resuming the session. If the current session is already suspended, this method does nothing. The suspended session automatically terminates if it is not resumed before the specified timeout period elapses.
Reasons for failure include:
timeout
- int - the timeout value to use for the suspended session in minutes. This value must greater than zero.connectionToken
- String - client supplied token used in resumeSession method to
re-establish the connection.ApptrieveException
- if a Host Integrator server error occursMetaDataOnlyException
- if this is a metadata-only connectionresumeConnection(java.lang.String)
int getSessionType()
Return values are:
SessionType3270
SessionType5250
SessionTypeHP
SessionTypeVT
SessionTypeUnknown
This value will be returned if the client is not connected to the server.
void setMetaDataOnly(boolean enable) throws ChannelException
true
will not be counted against session or session pool
limits on the session server.
This method can only be invoked while not connected.
enable
- indicating that this will be as a meta-data only session.ChannelException
- If the session is already connected.isMetaDataOnly()
,
MetaDataOnlyException
boolean isMetaDataOnly()
setMetaDataOnly(boolean)
,
MetaDataOnlyException