Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Java event delivery techniques

Paul Monday (pmonday@hotmail.com), Architect, J.D. Edwards
Paul Monday is an Architect at J.D. Edwards. He has six years of hands-on Java platform experience in a broad range of technologies including J2EE, Jini, and Jiro technology. After graduation from Winona State University in Winona, MN, Paul completed a Master's degree in Computer Science from Washington State University in Pullman, WA. His focus for the Master's degree was operating systems, specifically the Linux operating system. After receiving his degree, Paul worked for IBM on the SanFrancisco Project, Imation Corp. on a storage appliance initiative, and Retek Inc. on an enterprise application integration (EAI) project.

Summary:  Follow along with Java™ programming veteran Paul Monday as he walks you through a variety of event patterns and event delivery techniques in the Java 2 platform. From a simple example based on direct Java 2 platform classes and APIs to the construction of a distributed event delivery service, you'll learn first-hand about the complexities of building a distributed event environment.

Date:  12 Feb 2002
Level:  Introductory PDF:  A4 and Letter (255 KB | 33 pages)Get Adobe® Reader®

Activity:  6546 views
Comments:  

About this tutorial

What is this tutorial about?

The Java 2 platform enables programmers to think about systems in terms of events, rather than a traditional call-return architectural style. Within the platform itself, there is direct support for several event notification patterns. One way to think about events is through the granularity and ownership of an event. Some event patterns succeed in presenting events at the granularity of a state change in an object instance. Others are more fine-grained and address changes in properties. Still other event techniques must be used to present events that are not necessarily associated with an object instance. Once mastered, event-programming techniques can be applied to user interface programming, service-oriented architectures, and enterprise application integration.

In this tutorial, we'll walk through a variety of event patterns and event delivery techniques that are tailored to specific event granularities. We'll start with relatively simple examples based on direct Java 2 platform classes and APIs, then work through the construction of a distributed event delivery service. By the end of the tutorial, you'll have learned first-hand about the complexities of building a distributed event environment.


Should I take this tutorial?

This tutorial is intended to guide you through the complexities of event usage on the Java 2 platform. To that end, we'll focus on building event mechanisms from scratch, rather than applying a more user interface-centric approach.

We'll work through various event patterns that deliver different granularities of events. Upon reaching a convenient granularity for building distributed systems, we'll extend the model to a distributed environment. We'll wrap up with a completely different type of event service known as a topic-based event service.

By the time you've completed this tutorial, you will be comfortable with a variety of event patterns and implementations. If you're interested in event mechanisms that are specifically built for user interfaces, you'll likely learn quite a bit from the examples, although we will spend most of our time implementing non-visual, model-centric event mechanisms.

The technologies and techniques we'll use to complete the exercises are as follows:

  • JavaBeans: The JavaBeans technology illustrates many event patterns, but familiarity with JavaBeans technology is not a requirement for taking the tutorial. We'll walk through the examples of the important aspects of JavaBeans with respect to events.

  • Remote Method Invocation (RMI): By the latter half of the tutorial we'll implement a distributed event service. You need some basic knowledge of RMI technology to keep up with the example in this section.

  • UML: Class diagrams produced with TogetherJ are used to illustrate class relationships in each section of the tutorial; you should be able to interpret these diagrams.

  • Design patterns: Several design patterns and idioms are identified in the context of the tutorial, but you need not be an expert on the patterns to follow the examples.

See Resources for a listing of tutorials, articles, and other references that expand upon the material presented in this tutorial.


Code samples and installation requirements

All of the examples in this tutorial were built with the Netbeans development environment. While Netbeans offers first-class support for the JavaBeans event mechanism, any development editor or environment is sufficient to read the code.

It isn't essential that you compile and run the examples, but doing so may assist your learning. Java 2 platform, Standard Edition is required to compile and run the examples. See Resources to download the Java 2 platform.

The binaries and source code for the examples used in this tutorial are available as a downloadable jar file. See Resources to download the file.

1 of 9 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Java technology
ArticleID=131540
TutorialTitle=Java event delivery techniques
publish-date=02122002
author1-email=pmonday@hotmail.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).