⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jco.server.html

📁 SAP ERP的二次开发
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Mon Jan 08 21:40:04 CET 2007 -->
<TITLE>
SAP Java Connector: Class  JCO.Server
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../jco.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/JCO.Server.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../com/sap/mw/jco/JCO.Response.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../com/sap/mw/jco/JCO.ServerErrorListener.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="JCO.Server.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.sap.mw.jco</FONT>
<BR>
Class  JCO.Server</H2>
<PRE>
java.lang.Object
  |
  +--<A HREF="../../../../com/sap/mw/jco/JCO.Connection.html">com.sap.mw.jco.JCO.Connection</A>
        |
        +--<B>com.sap.mw.jco.JCO.Server</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD>java.lang.Cloneable, java.lang.Runnable</DD>
</DL>
<DL>
<DT><B>Enclosing class: </B><DD><A HREF="../../../../com/sap/mw/jco/JCO.html">JCO</A></DD>
</DL>
<HR>
<DL>
<DT>public static class <B>JCO.Server</B><DT>extends <A HREF="../../../../com/sap/mw/jco/JCO.Connection.html">JCO.Connection</A><DT>implements java.lang.Runnable</DL>

<P>
Encapsulates the basic JCO server functionality.  Application programmers will extend this class and  at least override the <tt>handleRequest()</tt> method to  implement a specific server. e.g.:  <pre><tt>  class MyServer extends JCO.Server {      // Process incoming requests      public void handleRequest(JCO.Function fct) {          try {             // Application specific processing goes here          }          catch(JCO.AbapException ex) {               throw ex;          }          catch(Throwable t) {               throw new JCO.AbapException("SYSTEM_FAILURE", t.getMessage());          }      }  }  </tt></pre>  <br />  <em>Note: If the server instance dispatches requests from an unicode system,  it is necessary to set the addtional property <tt>jco.server.unicode</tt> to <tt>1</tt>  and mark the destination in R/3 System (<tt>sm59</tt>) as unicode-enabled. Ensure to use  in this case an unicode conform metadata repository.</em><br />  Depending on the type of middleware layer loaded, the properties  recognized by the JCO server may vary.<br>  For <tt>com.sap.mw.jco.rfc.MiddlewareRFC</tt>, i.e. the default RFC  layer, the supported properties are:<p>  <table border=1>  <tr><td>jco.server.gwhost           </td><td>Gateway host</td></tr>  <tr><td>jco.server.gwserv           </td><td>Gateway service (usually sapgwNN)</td></tr>  <tr><td>jco.server.progid           </td><td>Program ID of the server</td></tr>  <tr><td>jco.server.trace            </td><td>Enable/disable RFC trace (1 or 0)</td></tr>  <tr><td>jco.server.params           </td><td>Arbitrary parameters for RFC library</td></tr>  <tr><td>jco.server.snc_myname       </td><td>SNC name</td></tr>  <tr><td>jco.server.snc_qop          </td><td>SNC level of security, 1 to 9</td></tr>  <tr><td>jco.server.snc_lib          </td><td>Path to the SNC library</td></tr>  <tr><td>jco.server.unicode          </td><td>Flags whether to connect in unicode mode (1 or 0)</td></tr>  <tr><td>jco.server.max_startup_delay</td><td>Maximum server startup delay time in seconds</td></tr>  <tr><td>jco.server.dsr              </td><td>Enable/Disable dsr support (0 or 1)</td></tr>  </table>
<P>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#AUTHORIZATION_MODE_BASIC">AUTHORIZATION_MODE_BASIC</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Authorization mode basic</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#AUTHORIZATION_MODE_SNC">AUTHORIZATION_MODE_SNC</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Authorization mode SNC</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#FUNCTION_MODEL">FUNCTION_MODEL</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Call <tt>void handleRequest(Function)</tt> method on incoming requests</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#REQUEST_RESPONSE_MODEL">REQUEST_RESPONSE_MODEL</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Call <tt>Response handleRequest(Request)</tt> method on incoming requests</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#JCO.Server(java.util.Properties)">JCO.Server</A></B>(java.util.Properties&nbsp;properties)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an instance of a server connection</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#JCO.Server(java.util.Properties, com.sap.mw.jco.IRepository)">JCO.Server</A></B>(java.util.Properties&nbsp;properties,           <A HREF="../../../../com/sap/mw/jco/IRepository.html">IRepository</A>&nbsp;repository)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an instance of a server connection</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#JCO.Server(java.util.Properties, com.sap.mw.jco.IServerThread, com.sap.mw.jco.IRepository)">JCO.Server</A></B>(java.util.Properties&nbsp;properties,           <A HREF="../../../../com/sap/mw/jco/IServerThread.html">IServerThread</A>&nbsp;thread,           <A HREF="../../../../com/sap/mw/jco/IRepository.html">IRepository</A>&nbsp;repository)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an instance of a server connection</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#JCO.Server(java.lang.String[][], com.sap.mw.jco.IRepository)">JCO.Server</A></B>(java.lang.String[][]&nbsp;params,           <A HREF="../../../../com/sap/mw/jco/IRepository.html">IRepository</A>&nbsp;repository)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an instance of a server using an array to specify the connection parameters. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#JCO.Server(java.lang.String[], com.sap.mw.jco.IRepository)">JCO.Server</A></B>(java.lang.String[]&nbsp;argv,           <A HREF="../../../../com/sap/mw/jco/IRepository.html">IRepository</A>&nbsp;repository)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an instance of a server using an arv array as passed by <tt>void main(String[] argv)</tt></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#JCO.Server(java.lang.String, java.lang.String, java.lang.String, com.sap.mw.jco.IRepository)">JCO.Server</A></B>(java.lang.String&nbsp;gwhost,           java.lang.String&nbsp;gwserv,           java.lang.String&nbsp;progid,           <A HREF="../../../../com/sap/mw/jco/IRepository.html">IRepository</A>&nbsp;repository)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an instance of a server connection</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#JCO.Server(java.lang.String, java.lang.String, java.lang.String, com.sap.mw.jco.IServerThread, com.sap.mw.jco.IRepository)">JCO.Server</A></B>(java.lang.String&nbsp;gwhost,           java.lang.String&nbsp;gwserv,           java.lang.String&nbsp;progid,           <A HREF="../../../../com/sap/mw/jco/IServerThread.html">IServerThread</A>&nbsp;thread,           <A HREF="../../../../com/sap/mw/jco/IRepository.html">IRepository</A>&nbsp;repository)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates an instance of a server connection</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#abort(java.lang.String)">abort</A></B>(java.lang.String&nbsp;message)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Aborts the connection to the remote system, i.e.  tries to send a final message to the host before it disconnects.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#checkAuthorization(java.lang.String, int, java.lang.String, byte[])">checkAuthorization</A></B>(java.lang.String&nbsp;function_name,                   int&nbsp;authorization_mode,                   java.lang.String&nbsp;authorization_partner,                   byte[]&nbsp;authorization_key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Called by the jni-layer to check for authorization in case of SNC usage for the server connection.<br>   Derived servers will override this function to actually implement  the authorization handling. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#disconnect()">disconnect</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Closes the connection to the remote system hardly and cleans up  the connection context.<br>  <em>Note:</em> This function is for internal use only. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../com/sap/mw/jco/JCO.Attributes.html">JCO.Attributes</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#getAttributes()">getAttributes</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the attributes object for this server.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../com/sap/mw/jco/JCO.Server.html#getCallModel()">getCallModel</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the call model which can be either <tt>JCO.Server.FUNCTION_MODEL</tt>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -