|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.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.
| Field Summary | |
protected static JCO.MetaData |
auth_trace_set
|
protected static JCO.MetaData |
auth_trace_set_unicode
|
protected static JCO.MetaData |
auth_trace_status
|
protected static JCO.MetaData |
auth_trace_status_rc
|
protected static JCO.MetaData |
auth_trace_status_rc_unicode
|
protected static JCO.MetaData |
auth_trace_status_unicode
|
protected com.sap.mw.jco.IMiddleware.IClient |
middleware
|
protected String |
stack_trace
|
| Fields inherited from class com.sap.mw.jco.JCO.Connection |
attributes, codepage_converter, conn_object, conn_params, connection_cpc_mode, dsr_monitor, jarm_monitor, last_active_timestamp, num_received_bytes, num_sent_bytes, passport_bytes, pool, properties, rfc_handle, rfm_name, start_time, state, throughput, time_handle_request, time_middleware, time_total |
| Constructor Summary | |
protected |
JCO.Client(Properties properties)
Creates an instance of a client connection to a remote SAP system |
protected |
JCO.Client(String[][] params)
Creates an instance of a client to a remote SAP system using an array to specify the connection parameters. |
protected |
JCO.Client(String gwhost,
String gwserv,
String tpname)
Creates an instance of a client connection to a remote JCO compliant server program |
protected |
JCO.Client(String gwhost,
String gwserv,
String tpname,
String tphost)
Creates an instance of a client connection to a remote JCO compliant server program |
protected |
JCO.Client(String client,
String user,
String passwd,
String lang,
String url)
Creates an instance of a client connection to a remote SAP system |
protected |
JCO.Client(String client,
String user,
String passwd,
String lang,
String ashost,
String sysnr)
Creates an instance of a client connection to a remote SAP system (no load balancing) |
protected |
JCO.Client(String client,
String user,
String passwd,
String lang,
String mshost,
String r3name,
String group)
Creates an instance of a client connection to a remote SAP system (with load balancing) |
protected |
JCO.Client(String client,
String user,
String passwd,
String lang,
String ashost,
String sysnr,
String gwhost,
String gwserv)
Creates an instance of a client connection to a remote SAP system (no load balancing) |
| Method Summary | |
void |
abort(String message)
Aborts the connection to the remote system, i.e. |
protected void |
beginCall()
Notify about begin of call processing |
Object |
clone()
Returns a clone of this connection The cloned connection however will not be opened |
void |
confirmTID(String tid)
Confirms that a transaction has been successfull |
void |
connect()
Opens a client connection to the remote system using the current connection parameters |
String |
createTID()
Creates a new transaction ID |
void |
disconnect()
Closes the connection to the remote system. |
protected void |
disconnect(boolean is_pooled)
Closes the connection to the remote system. |
void |
endAuthorizationTracing()
Resets authorization tracing in the SAP system for this client. |
protected void |
endCall()
Notify about end of call processing |
void |
execute(JCO.Function function)
Executes the function on the remote server synchronously |
void |
execute(JCO.Function function,
String tid)
Executes the function on the remote server in transactional mode (asynchronously) |
void |
execute(JCO.Function function,
String tid,
String queue_name)
Executes the function on the remote server in queued transactional mode (asynchronously) |
void |
execute(JCO.Function function,
String tid,
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,
String tid)
Executes the request on the remote server asynchronously |
void |
execute(JCO.Request request,
String tid,
String queue_name)
Executes the request on the remote server asynchronously |
void |
execute(JCO.Request request,
String tid,
String queue_name,
int queue_pos)
Executes the request on the remote server asynchronously |
protected JCO.Response |
execute(JCO.Request request,
String tid,
String queue_name,
int queue_pos,
int dummy)
Executes the request on the remote server synchronously |
void |
execute(String name,
JCO.ParameterList input,
JCO.ParameterList output)
Executes the function on the remote server synchronously |
void |
execute(String name,
JCO.ParameterList input,
JCO.ParameterList output,
JCO.ParameterList tables)
Executes the function on the remote server synchronously |
protected void |
execute(String name,
JCO.ParameterList input,
JCO.ParameterList input_tables,
JCO.ParameterList output,
JCO.ParameterList output_tables,
String tid,
String queue_name,
int queue_pos)
Executes the function on the remote server synchronously |
void |
execute(String name,
JCO.ParameterList input,
JCO.ParameterList tables,
String tid)
Executes the function on the remote server in transactional mode (asynchronously) |
void |
execute(String name,
JCO.ParameterList input,
JCO.ParameterList tables,
String tid,
String queue_name)
Executes the function on the remote server in queued transactional mode (asynchronously) |
void |
execute(String name,
JCO.ParameterList input,
JCO.ParameterList tables,
String tid,
String queue_name,
int queue_pos)
Executes the function on the remote server in transactional mode (asynchronously) |
protected void |
finalize()
Overrides the finalize method in Connection Called upon garbage collection |
boolean |
getAbapDebug()
Returns whether debugging is enabled or not. |
String |
getASHost()
Returns the application server |
JCO.Attributes |
getAttributes()
Returns the attributes object for this connection. |
String |
getAuthorizationTraceID()
Returns the currently used authorization trace ID for this client. |
String |
getClient()
Returns the client |
protected static com.sap.mw.jco.IMiddleware.IClient |
getClientInterface()
Creates a new middleware object |
String |
getGroup()
Returns the group of application servers |
String |
getGWHost()
Returns the gateway server |
String |
getGWServ()
Returns the gateway service |
String |
getHashKey(boolean personalized)
Returns a hash key for this client connection |
String |
getLanguage()
Returns the logon language |
String |
getMSHost()
Returns the message server |
protected String |
getPassword()
Returns the encrypted password |
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 |
String |
getSystemID()
Returns the SAP system ID |
String |
getSystemNumber()
Returns the system number |
String |
getTPName()
Returns the program ID of an registered JCO compliant server program |
boolean |
getTrace()
Returns whether trace is enabled or not. |
URL |
getURL()
Returns the url to the remote system |
String |
getUser()
Returns the user |
protected JCO.Client |
hide()
Hide the client from application to avoid further usage |
boolean |
isAlive()
Checks whether the connection is still alive |
boolean |
isAuthorizationTracingEnabled()
Checks whether authorization tracing is enabled in the SAP system. |
boolean |
isPooled()
Returns true if the client was allocated from an JCO.Pool. |
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(Object idoc,
String tid)
Asynchronously sends an intermediate document (IDoc) to the remote server |
void |
send(Object idoc,
String tid,
char idoc_version)
Asynchronously sends an intermediate document (IDoc) to the remote server |
void |
send(Object idoc,
String tid,
String queue_name)
Asynchronously sends an intermediate document (IDoc) to an inbound queue of a remote server |
void |
send(Object idoc,
String tid,
String queue_name,
char idoc_version)
Asynchronously sends an intermediate document (IDoc) to an inbound queue of a remote server |
void |
send(Object idoc,
String tid,
String queue_name,
int queue_pos)
Asynchronously sends an intermediate document (IDoc) to an inbound queue of a remote server |
void |
send(Object idoc,
String tid,
String queue_name,
int queue_pos,
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. |
void |
setDsrPassport(com.sap.jdsr.writer.DsrIPassport passport)
Sets jdsr passport for next remote function call. |
void |
setProperty(String key,
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. |
void |
startAuthorizationTracing(String traceID,
String serviceType)
Turns on authorization tracing, if authorization tracing is enabled in the SAP system. |
| Methods inherited from class com.sap.mw.jco.JCO.Connection |
checkProperties, getConnectionHandle, getProperties, getProperty, getThroughput, hideConnection, isValid, setState, setThroughput |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected com.sap.mw.jco.IMiddleware.IClient middleware
protected String stack_trace
protected static final JCO.MetaData auth_trace_set
protected static final JCO.MetaData auth_trace_set_unicode
protected static final JCO.MetaData auth_trace_status_rc
protected static final JCO.MetaData auth_trace_status_rc_unicode
protected static final JCO.MetaData auth_trace_status
protected static final JCO.MetaData auth_trace_status_unicode
| Constructor Detail |
protected JCO.Client(Properties properties)
properties - the connection parameters as a property listprotected JCO.Client(String[][] params)
static String[][] login_params = {
{ "client" , "000" },
{ "user" , "johndoe" },
{ "passwd" , "whoknows" },
{ "language" , "EN" },
...
};
...
JCO.Client = JCO.createClient(login_params);
params - the connection parameters as an two-dimemsional array
protected JCO.Client(String client,
String user,
String passwd,
String lang,
String ashost,
String sysnr)
client - SAP logon clientuser - SAP logon userpasswd - SAP logon passwordlang - SAP logon language. If null or "" is being passed
the default logon language will be used.ashost - Host name of the application serversysnr - SAP system number
protected JCO.Client(String client,
String user,
String passwd,
String lang,
String ashost,
String sysnr,
String gwhost,
String gwserv)
client - SAP logon clientuser - SAP logon userpasswd - SAP logon passwordlang - SAP logon language. If null or "" is being passed
the default logon language will be used.ashost - Host name of the application serversysnr - SAP system numbergwhost - Host name of the SAP gatewaygwserv - Service number of the SAP gateway
protected JCO.Client(String client,
String user,
String passwd,
String lang,
String mshost,
String r3name,
String group)
client - SAP logon clientuser - SAP logon userpasswd - SAP logon passwordlang - SAP logon language. If null or "" is being passed
the default logon language will be used.mshost - Host name of the message serverr3name - Name of the SAP systemgroup - Name of the group of application servers
protected JCO.Client(String gwhost,
String gwserv,
String tpname)
gwhost - Host name of the SAP gatewaygwserv - Service number of the SAP gatewaytpname - Program ID of an registered JCO compliant server program
protected JCO.Client(String gwhost,
String gwserv,
String tpname,
String tphost)
gwhost - Host name of the SAP gatewaygwserv - Service number of the SAP gatewaytpname - Program ID of an registered server programtphost - Host name where the external server runs
protected JCO.Client(String client,
String user,
String passwd,
String lang,
String url)
client - SAP logon clientuser - SAP logon userpasswd - SAP logon passwordlang - SAP logon language. If null or "" is being passed
the default logon language will be used.url - the url to the remote system| Method Detail |
protected static com.sap.mw.jco.IMiddleware.IClient getClientInterface()
public Object clone()
clone in class JCO.Connectionprotected final JCO.Client hide()
public void reset()
JCO.Exception - thrown if the client could not be resettedpublic final String[][] getPropertyInfo()
getPropertyInfo in class JCO.Connection
public void setProperty(String key,
String value)
setProperty in class JCO.Connectionpublic final String getUser()
protected final String getPassword()
public final String getClient()
public final String getLanguage()
public final String getSystemNumber()
public final String getASHost()
public final String getMSHost()
public final String getGWHost()
public final String getGWServ()
public final String getSystemID()
public final String getGroup()
public final String getTPName()
public final URL getURL()
public final boolean getTrace()
getTrace in class JCO.Connectionpublic final void setTrace(boolean trace)
setTrace in class JCO.Connectiontrace - 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()
getState in class JCO.Connection| 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.ConnectionJCO.Exception - thrown if the attributes could not be retrieved.JCO.Attributespublic String getHashKey(boolean personalized)
personalized - if true include the user into the key generation
public boolean isAlive()
isAlive in class JCO.Connectionpublic void connect()
JCO.Exception - if the connection could not be establishedpublic boolean isPooled()
public void disconnect()
disconnect in class JCO.ConnectionJCO.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)protected void disconnect(boolean is_pooled)
JCO.Exception - with the error group set to JCO.Exception.JCO_ERROR_RESOURCE,
if a client was allocated from a pool via getClient().
protected void finalize()
throws Throwable
finalize in class JCO.ConnectionThrowablepublic void abort(String message)
abort in class JCO.Connectionmessage - 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 server
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.Function function,
String tid)
function - the function to execute on the remote servertid - the transaction id to use for this call
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 successful
public void execute(JCO.Function function,
String tid,
String queue_name)
function - the function to execute on the remote servertid - the transaction id to use for this callqueue_name - the queue name where to insert the transaction.
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 successful
public void execute(JCO.Function function,
String tid,
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 where to insert the transaction.
If queue_name is null the call will be executed in normal
transaction mode.queue_pos - the position in the queue where to insert the transaction
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 successful
public void execute(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 module
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(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 module
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(String name,
JCO.ParameterList input,
JCO.ParameterList tables,
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 call
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 successful
public void execute(String name,
JCO.ParameterList input,
JCO.ParameterList tables,
String tid,
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 where to insert the transaction.
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 successful
public void execute(String name,
JCO.ParameterList input,
JCO.ParameterList tables,
String tid,
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 where to insert the transaction.
If queue_name is null the call will be executed in normal
transaction mode.queue_pos - the position in the queue where to insert the transaction
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 JCO.Response execute(JCO.Request request)
request - the request to execute on the remote server
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,
String tid)
request - the request to execute on the remote servertid - the transaction id to use for this call
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,
String tid,
String queue_name)
request - the request to execute on the remote servertid - the transaction id to use for this callqueue_name - the queue name where to insert the transaction.
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,
String tid,
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 where to insert the transaction.
If queue_name is null the call will be executed in normal
transaction mode.queue_pos - the position in the queue where to insert the transaction
JCO.AbapException - thrown if something went awry in the called function.
JCO.Exception - thrown if something went wrong during communication, marshalling, etc.
protected JCO.Response execute(JCO.Request request,
String tid,
String queue_name,
int queue_pos,
int dummy)
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 transaction
JCO.AbapException - thrown if something went awry in the called function.
JCO.Exception - thrown if something went wrong during communication, marshalling, etc.
protected void execute(String name,
JCO.ParameterList input,
JCO.ParameterList input_tables,
JCO.ParameterList output,
JCO.ParameterList output_tables,
String tid,
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 moduleoutput - the list of parameters to receive from the remote function module
JCO.AbapException - thrown if something went awry in the called function.
JCO.Exception - thrown if something went wrong during communication, marshalling, etc.
public void send(Object idoc,
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 call
JCO.Exception - thrown if something went wrong during communication.
RuntimeException - thrown if something went wrong when
parsing the IDoc.
public void send(Object idoc,
String tid,
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 where to insert the transaction.
If queue_name is null the call will be executed in normal
transaction mode.
JCO.Exception - thrown if something went wrong during communication.
RuntimeException - thrown if something went wrong when
parsing the IDoc.
public void send(Object idoc,
String tid,
String queue_name,
int queue_pos)
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 where to insert the transaction.
If queue_name is null the call will be executed in normal
transaction mode.queue_pos - the position in the queue where to insert the transaction
JCO.Exception - thrown if something went wrong during communication.
RuntimeException - thrown if something went wrong when
parsing the IDoc.
public void send(Object idoc,
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 version that will be used. Possible
options are JCO.IDOC_VERSION_DEFAULT
JCO.IDOC_VERSION_2JCO.IDOC_VERSION_3JCO.Exception - thrown if something went wrong during communication.
RuntimeException - thrown if something went wrong when
parsing the IDoc.
public void send(Object idoc,
String tid,
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 where to insert the transaction.
If queue_name is null the call will be executed in normal
transaction mode.idoc_version - the idoc version that will be used. Possible
options are JCO.IDOC_VERSION_DEFAULT
JCO.IDOC_VERSION_2JCO.IDOC_VERSION_3JCO.Exception - thrown if something went wrong during communication.
RuntimeException - thrown if something went wrong when
parsing the IDoc.
public void send(Object idoc,
String tid,
String queue_name,
int queue_pos,
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 where to insert the transaction.
If queue_name is null the call will be executed in normal
transaction mode.queue_pos - the position in the queue where to insert the transactionidoc_version - the idoc version that will be used. Possible
options are JCO.IDOC_VERSION_DEFAULT
JCO.IDOC_VERSION_2JCO.IDOC_VERSION_3JCO.Exception - thrown if something went wrong during communication.
RuntimeException - thrown if something went wrong when
parsing the IDoc.public String createTID()
JCO.Exception - thrown if something went wrong during the creationpublic void confirmTID(String tid)
tid - the ID of the transaction to confirm
JCO.Exception - thrown if something went wrong during the confirmationpublic final void ping()
JCO.Exception - thrown if the ping could not be executedpublic void setDsrPassport(com.sap.jdsr.writer.DsrIPassport passport)
JCO.Exception - if DSR Library isn't loaded or passport isn't validprotected void beginCall()
beginCall in class JCO.Connectionprotected void endCall()
JCO.Connection
endCall in class JCO.Connection
public void startAuthorizationTracing(String traceID,
String serviceType)
traceID - the unique name for identifying the authentication trace entries in the SAP systemserviceType - type of the service as String, which needs to be one of the following values
"BSP", "IVIEW", "PC-UI", "WEBDYNPRO", "WS"
JCO.Exception - if Client is not yet connectedpublic boolean isAuthorizationTracingEnabled()
JCO.Exception - if Client is not yet connectedpublic String getAuthorizationTraceID()
public void endAuthorizationTracing()
|
SAP NetWeaver 2004S SPS 10 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||