01: /*
02: *
03: * Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
04: *
05: * This software is the proprietary information of Sun Microsystems, Inc.
06: * Use is subject to license terms.
07: *
08: */
09:
10: package com.sun.portal.sample.j2ee.connector.comet;
11:
12: import javax.resource.cci.*;
13:
14: import java.io.Serializable;
15: import java.beans.*;
16:
17: // CustomCodeBegin globalScope
18:
19: // CustomCodeEnd
20:
21: /**
22: * This implementation class holds properties for driving an Interaction
23: * with an EIS instance. This class is a Java Bean, hence it supports
24: * bound properties.
25: */
26: public class CometInteractionSpec implements InteractionSpec,
27: java.io.Serializable {
28:
29: private PropertyChangeSupport changes = new PropertyChangeSupport(
30: this );
31:
32: // CustomCodeBegin classScope
33:
34: /* example code:
35: private String functionName;
36:
37: public String getFunctionName() {
38: return this.functionName;
39: }
40:
41: public void setFunctionName(String functionName) {
42: String oldName = this.functionName;
43: this.functionName = functionName;
44: changes.firePropertyChange("functionName",oldName,functionName);
45: }
46: */
47: // CustomCodeEnd
48:
49: /**
50: *Default Constructor
51: */
52: public CometInteractionSpec() {
53: System.out.println(" 7. In CometInteractionSpec ctor");
54: }
55:
56: /**
57: * Associate PropertyChangeListener to the CometInterationSpec.In order to
58: * notify about properties changes.
59: * java bean implementation.
60: */
61: public void addPropertyChangeListener(PropertyChangeListener l) {
62: changes.addPropertyChangeListener(l);
63: }
64:
65: /**
66: *Delete association of PropertyChangeListener to the CometInterationSpec.
67: */
68: public void removePropertyChangeListener(PropertyChangeListener l) {
69: changes.removePropertyChangeListener(l);
70: }
71: }
|