com.sap.mw.jco
Class JCO.Connection

java.lang.Object
  |
  +--com.sap.mw.jco.JCO.Connection
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
JCO.Client, JCO.Server
Enclosing class:
JCO

public abstract static class JCO.Connection
extends java.lang.Object
implements java.lang.Cloneable

JCO Client object base class. This class will never be instantiated directly but serves as a base class for the JCO.Client and JCO.Server classes.

See Also:
JCO.Client, JCO.Server

Method Summary
abstract  void abort(java.lang.String message)
          Aborts the connection to the remote system, i.e. tries to send a final message to the host before it disconnects.
 java.lang.Object clone()
          Returns a clone of this connection.
abstract  void disconnect()
          Closes the connection to the remote system.
abstract  JCO.Attributes getAttributes()
          Returns the attributes object for this connection.
 java.util.Properties getProperties()
          Returns the current connection parameters as a property list
 java.lang.String getProperty(java.lang.String key)
          Returns the property for the given key or null if not found
 java.lang.String[][] getPropertyInfo()
          Returns the property info for the connection.
 JCO.Throughput getThroughput()
          Returns the throughput object in which holds performance data.
 boolean getTrace()
          Returns whether trace is enabled or not.
abstract  boolean isAlive()
          Checks whether this connection is alive
 boolean isValid()
          Checks whether this connection is valid
 void setThroughput(JCO.Throughput throughput)
          Sets the throughput object in which performance data for the next will be stored.
 void setTrace(boolean trace)
          Enables/disables trace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

clone

public java.lang.Object clone()
Returns a clone of this connection. The cloned connection however will not be opened !

getProperties

public final java.util.Properties getProperties()
Returns the current connection parameters as a property list

getPropertyInfo

public java.lang.String[][] getPropertyInfo()
Returns the property info for the connection. The elements at [i][0] and [i][1] contain the name a brief description of the property, respectively.

getProperty

public final java.lang.String getProperty(java.lang.String key)
Returns the property for the given key or null if not found

isValid

public boolean isValid()
Checks whether this connection is valid
Returns:
true if the connection is valid, false otherwise

getTrace

public boolean getTrace()
Returns whether trace is enabled or not.
Returns:
true if trace is enabled, false otherwise

setTrace

public void setTrace(boolean trace)
Enables/disables trace
Parameters:
trace - if true enables the trace and disables it otherwise.

getThroughput

public final JCO.Throughput getThroughput()
Returns the throughput object in which holds performance data.
Returns:
the throughput object or null
See Also:
JCO.Throughput

setThroughput

public final void setThroughput(JCO.Throughput throughput)
Sets the throughput object in which performance data for the next will be stored.
Parameters:
throughput - the thoughput object in which to store performance data or null if not interested in such information.
See Also:
JCO.Throughput

getAttributes

public abstract JCO.Attributes getAttributes()
Returns the attributes object for this connection.
Returns:
the attributes object for this connection.
Throws:
JCO.Exception - thrown if the attributes could not be retrieved.
See Also:
JCO.Attributes

disconnect

public abstract void disconnect()
Closes the connection to the remote system.

abort

public abstract void abort(java.lang.String message)
Aborts the connection to the remote system, i.e. tries to send a final message to the host before it disconnects.
Parameters:
message - the final message that will be sent to the remote system.

isAlive

public abstract boolean isAlive()
Checks whether this connection is alive
Returns:
true if the connection is alive, false otherwise