com.softwareag.tamino.db.api.accessor
Class TSystemAccessorImpl

java.lang.Object
  extended by com.softwareag.tamino.db.api.accessor.TAbstractAccessor
      extended by com.softwareag.tamino.db.api.accessor.TSystemAccessorImpl
All Implemented Interfaces:
TAccessor, TInvalidatableAccessor, TSystemAccessor
Direct Known Subclasses:
TSystemAccessorTimeLoggingImpl

public class TSystemAccessorImpl
extends TAbstractAccessor
implements TSystemAccessor

TSystemAccessorImpl is the implementation class for TSystemAccessor.

Version:
$Revision: 1.22 $
Author:
Stefan Liebig

Field Summary
 
Fields inherited from class com.softwareag.tamino.db.api.accessor.TAbstractAccessor
canBeCancelled, clientRequests, requestCounter, SGUAI
 
Constructor Summary
TSystemAccessorImpl(TGenericAccessor genericAccessor)
          Special Constructor.
 
Method Summary
protected  TResponseHandle diagnose(TCommandValue commandValue)
          Execute the diagnose command.
 java.lang.String getAPIVersion()
          Get this a API�s version number.
 java.lang.String getFullServerVersion()
          Gets the full version information of the Tamino database server.
 java.lang.String getServerAPIVersion()
          Deprecated. Please use getServerVersion() instead.
 TServerEcho getServerEcho()
          Get the echo object.
 TServerTime getServerTime()
          Get the server up time information.
 java.lang.String getServerVersion()
          Get the Tamino server version.
 boolean isServerAlive()
          Tries to establish a connection and returns the answer.
 
Methods inherited from class com.softwareag.tamino.db.api.accessor.TAbstractAccessor
cancelRequests, getAccessCollection, getAccessLocation, getApplicationName, getCanBeCancelled, getDatabaseUri, getInvocation, getLocale, getLockMode, getLockwaitMode, getMaximumRequestDuration, invalidate, invoke, invoke, invoke, setAccessLocation, setApplicationName, setCanBeCancelled, setInvocation, setLockMode, setLockwaitMode, setMaximumRequestDuration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.softwareag.tamino.db.api.accessor.TAccessor
cancelRequests, getAccessLocation, getApplicationName, getCanBeCancelled, getLockMode, getLockwaitMode, getMaximumRequestDuration, setAccessLocation, setApplicationName, setCanBeCancelled, setLockMode, setLockwaitMode, setMaximumRequestDuration
 
Methods inherited from interface com.softwareag.tamino.db.api.accessor.TInvalidatableAccessor
invalidate
 

Constructor Detail

TSystemAccessorImpl

public TSystemAccessorImpl(TGenericAccessor genericAccessor)
Special Constructor. Initializes the accessor with the given TCommandInvocation and TResponseBuilder.

Parameters:
invocation -
responseBuilder -
Method Detail

isServerAlive

public boolean isServerAlive()
                      throws TAccessorException
Tries to establish a connection and returns the answer.

Specified by:
isServerAlive in interface TSystemAccessor
Returns:
success or failure of establishing a connection.
Throws:
TAccrssorException - if the the operation fails.
TAccessorException - signals an error while attempting to connect to the database.

getServerEcho

public TServerEcho getServerEcho()
                          throws TAccessorException
Get the echo object.

Specified by:
getServerEcho in interface TSystemAccessor
Returns:
TServerEcho instance.
Throws:
TAccrssorException - if the the operation fails.
TAccessorException - signals an error while attempting to connect to retrieve the information from the database.

getServerVersion

public java.lang.String getServerVersion()
                                  throws TAccessorException
Get the Tamino server version.

Specified by:
getServerVersion in interface TSystemAccessor
Returns:
Tamino server version.
Throws:
TAccrssorException - if the the operation fails.
TAccessorException - signals an error while attempting to to retrieve the information from the database.

getFullServerVersion

public java.lang.String getFullServerVersion()
                                      throws TAccessorException
Gets the full version information of the Tamino database server. The full version is returned as a string consisting of 4 numbers plus additional information each separated by a period, e.g. 4.2.1.293.0.

This feature requires Tamino 4.2

Specified by:
getFullServerVersion in interface TSystemAccessor
Returns:
Tamino full server version.
Throws:
TAccessorException - signals an error while attempting to to retrieve the information from the database.

getServerAPIVersion

public java.lang.String getServerAPIVersion()
                                     throws TAccessorException
Deprecated. Please use getServerVersion() instead.

Gets the version of the Tamino server API. The version is returned as a string consisting of 2 numbers separated by a period, e.g. 1.1.

Specified by:
getServerAPIVersion in interface TSystemAccessor
Returns:
Tamino server API version.
Throws:
TAccessorException - signals an error while attempting to connect to retrieve the information from the database.

getServerTime

public TServerTime getServerTime()
                          throws TAccessorException
Get the server up time information.

Specified by:
getServerTime in interface TSystemAccessor
Returns:
TServerTime instance
Throws:
TAccessorException - if the the operation fails.

getAPIVersion

public java.lang.String getAPIVersion()
Get this a API�s version number.

Specified by:
getAPIVersion in interface TSystemAccessor
Returns:
API version number or null if not present.

diagnose

protected TResponseHandle diagnose(TCommandValue commandValue)
                            throws TAccessorException
Execute the diagnose command.

Returns:
the answer.
Throws:
TAccrssorException - if the the operation fails.
TAccessorException


Copyright (c) 2013 Software AG. All Rights Reserved.