All Examples This Package
Class examples.event.stocks.Register
java.lang.Object
|
+----examples.event.stocks.Register
- public class Register
- extends Object
This application sends email to a designated recipient when
a particular stock reaches a particular value. WebLogic Event Services
are used to monitor the value of stock prices.
To run this application, use this command:
java examples.event.stocks.Register WebLogicURL STOCKSYMBOL PRICE SMTPHOST EMAIL
For example,
java examples.event.stocks.Register t3://localhost:7001 SUNW 75 smtp.best.com demos@foo.com
From another window, you'll need to generate some event traffice
with another class. You can do that with the SendEvents class:
java examples.event.stocks.SendEvents WebLogicURL STOCKSSYMBOL STARTPRICE ENDPRICE
which will simulate a stock's price changing from STARTPRICE to ENDPRICE.
- Author:
- Copyright (c) 1997-98 by WebLogic, Inc. All Rights Reserved.
- Copyright (c) 1999 by BEA Systems. All Rights Reserved.
-
Register()
-
-
main(String[])
- Runs this class from the command line.
Register
public Register()
main
public static void main(String argv[]) throws Exception
- Runs this class from the command line. It requires 5
arguments:
- WebLogic Server URL
- 4-letter stock identifier
- Requested price
- SMTP server for sending your mail
- Your email address
All Examples This Package