|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sap.mw.jco.JCO.Connection | +--com.sap.mw.jco.JCO.Client
This object holds all information necessary to establish a connection to a remote JCO server, i.e. either a SAP system or an external JCO compliant server, respectively.
Method Summary | |
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 The cloned connection however will not be opened |
void |
confirmTID(java.lang.String tid)
Confirms that a transaction has been successfull |
void |
connect()
Opens a client connection to the remote system using the current connection parameters |
java.lang.String |
createTID()
Creates a new transaction ID |
void |
disconnect()
Closes the connection to the remote system. |
void |
execute(JCO.Function function)
Executes the function on the remote server synchronously |
void |
execute(JCO.Function function,
java.lang.String tid)
Executes the function on the remote server in transactional mode (asynchronously) |
void |
execute(JCO.Function function,
java.lang.String tid,
java.lang.String queue_name)
Executes the function on the remote server in queued transactional mode (asynchronously) |
void |
execute(JCO.Function function,
java.lang.String tid,
java.lang.String queue_name,
int queue_pos)
Executes the function on the remote server in transactional mode (asynchronously) |
JCO.Response |
execute(JCO.Request request)
Executes the request on the remote server synchronously |
void |
execute(JCO.Request request,
java.lang.String tid)
Executes the request on the remote server asynchronously |
void |
execute(JCO.Request request,
java.lang.String tid,
java.lang.String queue_name)
Executes the request on the remote server asynchronously |
void |
execute(JCO.Request request,
java.lang.String tid,
java.lang.String queue_name,
int queue_pos)
Executes the request on the remote server asynchronously |
void |
execute(java.lang.String name,
JCO.ParameterList input,
JCO.ParameterList output)
Executes the function on the remote server synchronously |
void |
execute(java.lang.String name,
JCO.ParameterList input,
JCO.ParameterList output,
JCO.ParameterList tables)
Executes the function on the remote server synchronously |
void |
execute(java.lang.String name,
JCO.ParameterList input,
JCO.ParameterList tables,
java.lang.String tid)
Executes the function on the remote server in transactional mode (asynchronously) |
void |
execute(java.lang.String name,
JCO.ParameterList input,
JCO.ParameterList tables,
java.lang.String tid,
java.lang.String queue_name)
Executes the function on the remote server in queued transactional mode (asynchronously) |
void |
execute(java.lang.String name,
JCO.ParameterList input,
JCO.ParameterList tables,
java.lang.String tid,
java.lang.String queue_name,
int queue_pos)
Executes the function on the remote server in transactional mode (asynchronously) |
boolean |
getAbapDebug()
Returns whether debugging is enabled or not. |
java.lang.String |
getASHost()
Returns the application server |
JCO.Attributes |
getAttributes()
Returns the attributes object for this connection. |
java.lang.String |
getClient()
Returns the client |
java.lang.String |
getGroup()
Returns the group of application servers |
java.lang.String |
getGWHost()
Returns the gateway server |
java.lang.String |
getGWServ()
Returns the gateway service |
java.lang.String |
getHashKey(boolean personalized)
Returns a hash key for this client connection |
java.lang.String |
getLanguage()
Returns the logon language |
java.lang.String |
getMSHost()
Returns the message server |
java.lang.String[][] |
getPropertyInfo()
Returns the property info for the connection |
int |
getSapGui()
Returns if a SAP GUI is being used during a call |
byte |
getState()
Returns the state of the client as a bit vector |
java.lang.String |
getSystemID()
Returns the SAP system ID |
java.lang.String |
getSystemNumber()
Returns the system number |
java.lang.String |
getTPName()
Returns the program ID of an registered JCO compliant server program |
boolean |
getTrace()
Returns whether trace is enabled or not. |
java.net.URL |
getURL()
Returns the url to the remote system |
java.lang.String |
getUser()
Returns the user |
boolean |
isAlive()
Checks whether the connection is still alive |
void |
ping()
Sends a ping to the server |
void |
reset()
Resets the client, i.e. frees all resources allocated by this connection on the client and server side. |
void |
send(java.lang.Object idoc,
java.lang.String tid)
Asynchronously sends an intermediate document (IDoc) to the remote server |
void |
send(java.lang.Object idoc,
java.lang.String tid,
char idoc_version)
Asynchronously sends an intermediate document (IDoc) to the remote server |
void |
send(java.lang.Object idoc,
java.lang.String tid,
java.lang.String queue_name)
Asynchronously sends an intermediate document (IDoc) to an inbound queue of a remote server |
void |
send(java.lang.Object idoc,
java.lang.String tid,
java.lang.String queue_name,
char idoc_version)
Asynchronously sends an intermediate document (IDoc) to an inbound queue of a remote server |
void |
setAbapDebug(boolean debug)
Enables/disables abap debug. Note:If the connection is already established the method will close and reopen the connection. |
void |
setProperty(java.lang.String key,
java.lang.String value)
Sets the property for the given key. |
void |
setSapGui(int use_sapgui)
Sets the use_sapgui parameter |
void |
setTrace(boolean trace)
Enables/disables trace. Note:If the connection is already established the method will close and reopen the connection. |
Methods inherited from class com.sap.mw.jco.JCO.Connection |
getProperties, getProperty, getThroughput, isValid, setThroughput |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public java.lang.Object clone()
clone
in class JCO.Connection
public void reset()
JCO.Exception
- thrown if the client could not be resettedpublic final java.lang.String[][] getPropertyInfo()
getPropertyInfo
in class JCO.Connection
public void setProperty(java.lang.String key, java.lang.String value)
public final java.lang.String getUser()
public final java.lang.String getClient()
public final java.lang.String getLanguage()
public final java.lang.String getSystemNumber()
public final java.lang.String getASHost()
public final java.lang.String getMSHost()
public final java.lang.String getGWHost()
public final java.lang.String getGWServ()
public final java.lang.String getSystemID()
public final java.lang.String getGroup()
public final java.lang.String getTPName()
public final java.net.URL getURL()
public final boolean getTrace()
getTrace
in class JCO.Connection
public final void setTrace(boolean trace)
setTrace
in class JCO.Connection
trace
- if true enables the trace and disables it otherwise.public boolean getAbapDebug()
public void setAbapDebug(boolean debug)
debug
- if true enables ABAP debugging, disables it otherwisepublic int getSapGui()
public void setSapGui(int use_sapgui)
use_sapgui
- 0/1/2: without/with/invisible SAPGUIpublic byte getState()
Flag | Description |
---|---|
JCO.STATE_DISCONNECTED | The client is disconnected |
JCO.STATE_CONNECTED | The client is connected to the remote server |
JCO.STATE_BUSY | The client is currently executing a remote function call |
JCO.STATE_USED | A pooled connection has been allocated by a program |
public final JCO.Attributes getAttributes()
getAttributes
in class JCO.Connection
JCO.Exception
- thrown if the attributes could not be retrieved.JCO.Attributes
public java.lang.String getHashKey(boolean personalized)
personalized
- if true include the user into the key generationpublic boolean isAlive()
isAlive
in class JCO.Connection
public void connect()
JCO.Exception
- if the connection could not be establishedpublic void disconnect()
disconnect
in class JCO.Connection
JCO.Exception
- with the error group set to JCO.Exception.JCO_ERROR_RESOURCE,
must be released back to its pool by using JCO.releaseClient().JCO.releaseClient(com.sap.mw.jco.JCO.Client)
public void abort(java.lang.String message)
abort
in class JCO.Connection
message
- the final message which will be sent to the remote system.public void execute(JCO.Function function)
function
- the function to execute on the remote serverJCO.AbapException
- thrown if something went awry in the called function.JCO.Exception
- thrown if something went wrong during communication, marshalling, etc.public void execute(JCO.Function function, java.lang.String tid)
function
- the function to execute on the remote servertid
- the transaction id to use for this callJCO.AbapException
- thrown if something went awry in the called function.JCO.Exception
- thrown if something went wrong during communication, marshalling, etc.
Note: Don't forget to call confirmTID() if this call was successfulpublic void execute(JCO.Function function, java.lang.String tid, java.lang.String queue_name)
function
- the function to execute on the remote servertid
- the transaction id to use for this callqueue_name
- the queue name were to insert the transaction to.
if queue_name is null the call will be executed in normal
transaction mode.JCO.AbapException
- thrown if something went awry in the called function.JCO.Exception
- thrown if something went wrong during communication, marshalling, etc.
Note: Don't forget to call confirmTID() if this call was successfulpublic void execute(JCO.Function function, java.lang.String tid, java.lang.String queue_name, int queue_pos)
function
- the function to execute on the remote servertid
- the transaction id to use for this callqueue_name
- the queue name were to insert the transaction to.
if queue_name is null the call will be executed in normal
transaction mode.queue_pos
- the position in the queue were to insert the transactionJCO.AbapException
- thrown if something went awry in the called function.JCO.Exception
- thrown if something went wrong during communication, marshalling, etc.
Note: Don't forget to call confirmTID() if this call was successfulpublic void execute(java.lang.String name, JCO.ParameterList input, JCO.ParameterList output)
name
- the name of the remote function to executeinput
- the list of parameters to send to the remote function moduleoutput
- the list of parameters to receive from the remote function moduleJCO.AbapException
- thrown if something went awry in the called function.JCO.Exception
- thrown if something went wrong during communication, marshalling, etc.public void execute(java.lang.String name, JCO.ParameterList input, JCO.ParameterList output, JCO.ParameterList tables)
name
- the name of the remote function to executeinput
- the list of parameters to send to the remote function moduleoutput
- the list of parameters to receive from the remote function moduletables
- the list of tables to pass on to the remote function moduleJCO.AbapException
- thrown if something went awry in the called function.JCO.Exception
- thrown if something went wrong during communication, marshalling, etc.public void execute(java.lang.String name, JCO.ParameterList input, JCO.ParameterList tables, java.lang.String tid)
name
- the name of the remote function to executeinput
- the list of parameters to send to the remote function moduletables
- the list of tables to pass on to the remote function moduletid
- the transaction id to use for this callJCO.AbapException
- thrown if something went awry in the called function.JCO.Exception
- thrown if something went wrong during communication, marshalling, etc.
Note: Don't forget to call confirmTID() if this call was successfulpublic void execute(java.lang.String name, JCO.ParameterList input, JCO.ParameterList tables, java.lang.String tid, java.lang.String queue_name)
name
- the name of the remote function to executeinput
- the list of parameters to send to the remote function moduletables
- the list of tables to pass on to the remote function moduletid
- the transaction id to use for this callqueue_name
- the queue name were to insert the transaction to.
if queue_name is null the call will be executed in normal
transaction mode.JCO.AbapException
- thrown if something went awry in the called function.JCO.Exception
- thrown if something went wrong during communication, marshalling, etc.
Note: Don't forget to call confirmTID() if this call was successfulpublic void execute(java.lang.String name, JCO.ParameterList input, JCO.ParameterList tables, java.lang.String tid, java.lang.String queue_name, int queue_pos)
name
- the name of the remote function to executeinput
- the list of parameters to send to the remote function moduletables
- the list of tables to pass on to the remote function moduletid
- the transaction id to use for this callqueue_name
- the queue name were to insert the transaction to.
if queue_name is null the call will be executed in normal
transaction mode.queue_pos
- the position in the queue were to insert the transactionJCO.AbapException
- thrown if something went awry in the called function.JCO.Exception
- thrown if something went wrong during communication, marshalling, etc.
Note: Don't forget to call confirmTID() if this call was successfulpublic JCO.Response execute(JCO.Request request)
request
- the request to execute on the remote serverJCO.AbapException
- thrown if something went awry in the called function.JCO.Exception
- thrown if something went wrong during communication, marshalling, etc.public void execute(JCO.Request request, java.lang.String tid)
request
- the request to execute on the remote servertid
- the transaction id to use for this callJCO.AbapException
- thrown if something went awry in the called function.JCO.Exception
- thrown if something went wrong during communication, marshalling, etc.public void execute(JCO.Request request, java.lang.String tid, java.lang.String queue_name)
request
- the request to execute on the remote servertid
- the transaction id to use for this callqueue_name
- the queue name were to insert the transaction to.
if queue_name is null the call will be executed in normal
transaction mode.JCO.AbapException
- thrown if something went awry in the called function.JCO.Exception
- thrown if something went wrong during communication, marshalling, etc.public void execute(JCO.Request request, java.lang.String tid, java.lang.String queue_name, int queue_pos)
request
- the request to execute on the remote servertid
- the transaction id to use for this callqueue_name
- the queue name were to insert the transaction to.
if queue_name is null the call will be executed in normal
transaction mode.queue_pos
- the position in the queue were to insert the transactionJCO.AbapException
- thrown if something went awry in the called function.JCO.Exception
- thrown if something went wrong during communication, marshalling, etc.public void send(java.lang.Object idoc, java.lang.String tid)
idoc
- the intermediate document to send. This has to be an implementation of
the JCO.IDocument interface.tid
- the transaction id to use for this callJCO.Exception
- thrown if something went wrongpublic void send(java.lang.Object idoc, java.lang.String tid, java.lang.String queue_name)
idoc
- the intermediate document to send. The passed object must have the
JCO.IDocument interface implemented.tid
- the transaction id to use for this callqueue_name
- the queue name were to insert the transaction to.
if queue_name is null the call will be executed in normal
transaction mode.JCO.Exception
- thrown if something went wrong during communication.public void send(java.lang.Object idoc, java.lang.String tid, char idoc_version)
idoc
- the intermediate document to send. The passed object must have the
JCO.IDocument interface implemented.tid
- the transaction id to use for this callidoc_version
- the idoc versionJCO.Exception
- thrown if something went wrong during communication.public void send(java.lang.Object idoc, java.lang.String tid, java.lang.String queue_name, char idoc_version)
idoc
- the intermediate document to send. The passed object must have the
JCO.IDocument interface implemented.tid
- the transaction id to use for this callqueue_name
- the queue name were to insert the transaction to.
if queue_name is null the call will be executed in normal
transaction mode.idoc_version
- the idoc versionJCO.Exception
- thrown if something went wrong during communication.public java.lang.String createTID()
JCO.Exception
- thrown if something went wrong during the creationpublic void confirmTID(java.lang.String tid)
tid
- the ID of the transaction to confirmJCO.Exception
- thrown if something went wrong during the confirmationpublic final void ping()
JCO.Exception
- thrown if the ping could not be executed
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |