📄 traderbean.html
字号:
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#examples.ejb20.basic.statefulSession.TraderBean.VERBOSE">Constant Field Values</A></DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="TraderBean()"><!-- --></A><H3>
TraderBean</H3>
<PRE>
public <B>TraderBean</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="buy(java.lang.String, java.lang.String, int)"><!-- --></A><H3>
buy</H3>
<PRE>
public <A HREF="../../../../examples/ejb20/basic/statefulSession/TradeResult.html">TradeResult</A> <B>buy</B>(java.lang.String customerName,
java.lang.String stockSymbol,
int shares)
throws <A HREF="../../../../examples/ejb20/basic/statefulSession/ProcessingErrorException.html">ProcessingErrorException</A></PRE>
<DL>
<DD>Buys shares of a stock for a named customer.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>customerName</CODE> - String Customer name<DD><CODE>stockSymbol</CODE> - String Stock symbol<DD><CODE>shares</CODE> - int Number of shares to buy
<DT><B>Returns:</B><DD>TradeResult Trade Result
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../examples/ejb20/basic/statefulSession/ProcessingErrorException.html">ProcessingErrorException</A></CODE> - if there is an error while buying the shares</DL>
</DD>
</DL>
<HR>
<A NAME="ejbActivate()"><!-- --></A><H3>
ejbActivate</H3>
<PRE>
public void <B>ejbActivate</B>()</PRE>
<DL>
<DD>This method is required by the EJB Specification,
but is not used by this example.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>ejbActivate</CODE> in interface <CODE>javax.ejb.SessionBean</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="ejbCreate()"><!-- --></A><H3>
ejbCreate</H3>
<PRE>
public void <B>ejbCreate</B>()
throws javax.ejb.CreateException</PRE>
<DL>
<DD>This method corresponds to the create method in the home interface
"TraderHome.java".
The parameter sets of the two methods are identical. When the client calls
<code>TraderHome.create()</code>, the container allocates an instance of
the EJBean and calls <code>ejbCreate()</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>javax.ejb.CreateException</CODE> - if there is a problem creating the bean<DT><B>See Also:</B><DD><A HREF="../../../../examples/ejb20/basic/statefulSession/Trader.html"><CODE>Trader</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="ejbPassivate()"><!-- --></A><H3>
ejbPassivate</H3>
<PRE>
public void <B>ejbPassivate</B>()</PRE>
<DL>
<DD>This method is required by the EJB Specification,
but is not used by this example.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>ejbPassivate</CODE> in interface <CODE>javax.ejb.SessionBean</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="ejbRemove()"><!-- --></A><H3>
ejbRemove</H3>
<PRE>
public void <B>ejbRemove</B>()</PRE>
<DL>
<DD>This method is required by the EJB Specification,
but is not used by this example.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>ejbRemove</CODE> in interface <CODE>javax.ejb.SessionBean</CODE></DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="getBalance()"><!-- --></A><H3>
getBalance</H3>
<PRE>
public double <B>getBalance</B>()</PRE>
<DL>
<DD>Returns the current balance of a trading session.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>double Balance</DL>
</DD>
</DL>
<HR>
<A NAME="getStockPrice(java.lang.String)"><!-- --></A><H3>
getStockPrice</H3>
<PRE>
public double <B>getStockPrice</B>(java.lang.String stockSymbol)
throws <A HREF="../../../../examples/ejb20/basic/statefulSession/ProcessingErrorException.html">ProcessingErrorException</A></PRE>
<DL>
<DD>Returns the stock price for a given stock.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>stockSymbol</CODE> - String Stock symbol
<DT><B>Returns:</B><DD>double Stock price
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../examples/ejb20/basic/statefulSession/ProcessingErrorException.html">ProcessingErrorException</A></CODE> - if there is an error while checking the price</DL>
</DD>
</DL>
<HR>
<A NAME="sell(java.lang.String, java.lang.String, int)"><!-- --></A><H3>
sell</H3>
<PRE>
public <A HREF="../../../../examples/ejb20/basic/statefulSession/TradeResult.html">TradeResult</A> <B>sell</B>(java.lang.String customerName,
java.lang.String stockSymbol,
int shares)
throws <A HREF="../../../../examples/ejb20/basic/statefulSession/ProcessingErrorException.html">ProcessingErrorException</A></PRE>
<DL>
<DD>Sells shares of a stock for a named customer.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>customerName</CODE> - String Customer name<DD><CODE>stockSymbol</CODE> - String Stock symbol<DD><CODE>shares</CODE> - int Number of shares to buy
<DT><B>Returns:</B><DD>TradeResult Trade Result
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../examples/ejb20/basic/statefulSession/ProcessingErrorException.html">ProcessingErrorException</A></CODE> - if there is an error while selling the shares</DL>
</DD>
</DL>
<HR>
<A NAME="setSessionContext(javax.ejb.SessionContext)"><!-- --></A><H3>
setSessionContext</H3>
<PRE>
public void <B>setSessionContext</B>(javax.ejb.SessionContext ctx)</PRE>
<DL>
<DD>Sets the session context.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>setSessionContext</CODE> in interface <CODE>javax.ejb.SessionBean</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ctx</CODE> - SessionContext Context for session</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</td><td valign=bottom align=right>Documentation is available at<br> <a href=http://e-docs.bea.com/wls/docs81>http://e-docs.bea.com/wls/docs81</a></td></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../examples/ejb20/basic/statefulSession/Client.html"><B>PREV CLASS</B></A>
<A HREF="../../../../examples/ejb20/basic/statefulSession/TradeResult.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>
<A HREF="TraderBean.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<a href=http://e-docs.bea.com/wls/docs81/copyright.html>Copyright</a> © 2003 BEA Systems, Inc. All Rights Reserved.
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -