Source Code Cross Referenced for BpelDebugger.java in  » IDE-Netbeans » bpel » org » netbeans » modules » bpel » debugger » api » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Netbeans » bpel » org.netbeans.modules.bpel.debugger.api 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * The contents of this file are subject to the terms of the Common Development
003:         * and Distribution License (the License). You may not use this file except in
004:         * compliance with the License.
005:         * 
006:         * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
007:         * or http://www.netbeans.org/cddl.txt.
008:         * 
009:         * When distributing Covered Code, include this CDDL Header Notice in each file
010:         * and include the License file at http://www.netbeans.org/cddl.txt.
011:         * If applicable, add the following below the CDDL Header, with the fields
012:         * enclosed by brackets [] replaced by your own identifying information:
013:         * "Portions Copyrighted [year] [name of copyright owner]"
014:         * 
015:         * The Original Software is NetBeans. The Initial Developer of the Original
016:         * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
017:         * Microsystems, Inc. All Rights Reserved.
018:         */
019:
020:        package org.netbeans.modules.bpel.debugger.api;
021:
022:        import java.beans.PropertyChangeListener;
023:        import java.beans.PropertyChangeSupport;
024:        import java.util.Properties;
025:        import org.netbeans.api.debugger.DebuggerInfo;
026:        import org.netbeans.api.debugger.DebuggerManager;
027:        import org.netbeans.modules.bpel.debugger.api.breakpoints.LineBreakpoint;
028:        import org.netbeans.spi.debugger.ContextProvider;
029:
030:        /**
031:         *
032:         * @author Alexander Zgursky
033:         */
034:        public abstract class BpelDebugger {
035:
036:            /** Name of property for state of debugger. */
037:            public static final String PROP_STATE = "state"; // NOI18N
038:
039:            /** Name of property for current process instance. */
040:            public static final String PROP_CURRENT_PROCESS_INSTANCE = "currentProcessInstance"; //NOI18N
041:
042:            /** Name of property for current process instance. */
043:            public static final String PROP_CURRENT_PROCESS_INSTANCE_STATE = "currentProcessInstanceState"; //NOI18N
044:
045:            /** Name of property for current position. */
046:            public static final String PROP_CURRENT_POSITION = "currentPosition"; //NOI18N
047:
048:            /** Debugger state constant. */
049:            public static final int STATE_STARTING = 1;
050:            /** Debugger state constant. */
051:            public static final int STATE_RUNNING = 2;
052:            /** Debugger state constant. */
053:            public static final int STATE_DISCONNECTED = 4;
054:
055:            private PropertyChangeSupport myPcs;
056:            private ContextProvider myLookupProvider;
057:            private Tracer mTracer;
058:
059:            protected BpelDebugger(ContextProvider lookupProvider) {
060:                myLookupProvider = lookupProvider;
061:                myPcs = new PropertyChangeSupport(this );
062:            }
063:
064:            /**
065:             * Returns tracer to be used for the current debug session.
066:             * 
067:             * @return tracer to be used for the current debug session
068:             */
069:            public Tracer getTracer() {
070:                if (mTracer == null) {
071:                    mTracer = TracerAccess.getTracer(getLookupProvider());
072:                }
073:                return mTracer;
074:            }
075:
076:            /**
077:             * Starts BPEL debug session.
078:             * @param props properties to be used to start a debug session
079:             */
080:            public static void start(Properties props) {
081:                ProcessDICookie cookie = ProcessDICookie.create(props);
082:
083:                DebuggerManager.getDebuggerManager().startDebugging(
084:                        DebuggerInfo.create(ProcessDICookie.ID,
085:                                new Object[] { cookie }));
086:            }
087:
088:            /**
089:             * Stops the debugger and terminates the debugging session.
090:             */
091:            public abstract void finish();
092:
093:            /**
094:             * Causes current process instance to do a step into or does nothing if
095:             * there's no current process instance or it's not in the suspended state.
096:             */
097:            public abstract void stepInto();
098:
099:            /**
100:             * Causes current process instance to do a step over or does nothing if
101:             * there's no current process instance or it's not in the suspended state.
102:             */
103:            public abstract void stepOver();
104:
105:            /**
106:             * Causes current process instance to do a step out or does nothing if
107:             * there's no current process instance or it's not in the suspended state.
108:             */
109:            public abstract void stepOut();
110:
111:            /**
112:             * Pauses the execution of the current process instance or does nothing if
113:             * there's no current process instance or it's not in the suspended state.
114:             */
115:            public abstract void pause();
116:
117:            /**
118:             * Resumes the execution of the current process instance or does nothing if
119:             * there's no current process instance or it's not in the suspended state.
120:             */
121:            public abstract void resume();
122:
123:            /**
124:             * Returns current state of BPEL debugger.
125:             *
126:             * @return current state of BPEL debugger
127:             * @see #STATE_STARTING
128:             * @see #STATE_RUNNING
129:             * @see #STATE_DISCONNECTED
130:             */
131:            public abstract int getState();
132:
133:            public abstract ProcessInstancesModel getProcessInstancesModel();
134:
135:            /**
136:             * Returns state of the current process instance.
137:             *
138:             * @return state of the the current process instance or
139:             *         {@link ProcessInstance#STATE_UNKNOWN} if there's no
140:             *         current instance
141:             *
142:             * @see ProcessInstance#STATE_UNKNOWN
143:             * @see ProcessInstance#STATE_RUNNING
144:             * @see ProcessInstance#STATE_SUSPENDED
145:             * @see ProcessInstance#STATE_COMPLETED
146:             * @see ProcessInstance#STATE_FAILED
147:             * @see ProcessInstance#STATE_TERMINATED
148:             */
149:            public abstract int getCurrentProcessInstanceState();
150:
151:            /**
152:             * Returns current process instance.
153:             *
154:             * @return current process instance
155:             *         or null if there's no current process instance
156:             */
157:            public abstract ProcessInstance getCurrentProcessInstance();
158:
159:            /**
160:             * Sets the current process instance. Does nothing if given process instance
161:             * doesn't exist in the model.
162:             *
163:             * @param processInstance process instance to set as current
164:             */
165:            public abstract void setCurrentProcessInstance(
166:                    ProcessInstance processInstance);
167:
168:            /**
169:             * Returns position at which current process instance has been suspended.
170:             *
171:             * @return  current position at which current process instance has been
172:             *          suspended or <code>null</code> if there's no current process
173:             *          instance or it's not suspended
174:             *
175:             * @see #getCurrentProcessInstance()
176:             * @see ProcessInstance#getState()
177:             * @see ProcessInstance#getCurrentPosition
178:             */
179:            public abstract Position getCurrentPosition();
180:
181:            /**
182:             * Returns an exception that caused debugger to disconnect.
183:             *
184:             * @return an exception that caused debugger to disconnect or null if
185:             *          there was no exception
186:             */
187:            public abstract Exception getException();
188:
189:            public abstract void runToCursor(LineBreakpoint breakpoint);
190:
191:            /**
192:             * Fires property change.
193:             */
194:            protected final void firePropertyChange(String name, Object o,
195:                    Object n) {
196:                myPcs.firePropertyChange(name, o, n);
197:            }
198:
199:            /**
200:             * Adds property change listener.
201:             *
202:             * @param l new listener.
203:             */
204:            public final void addPropertyChangeListener(PropertyChangeListener l) {
205:                myPcs.addPropertyChangeListener(l);
206:            }
207:
208:            /**
209:             * Removes property change listener.
210:             *
211:             * @param l removed listener.
212:             */
213:            public final void removePropertyChangeListener(
214:                    PropertyChangeListener l) {
215:                myPcs.removePropertyChangeListener(l);
216:            }
217:
218:            /**
219:             * Adds property change listener.
220:             *
221:             * @param propertyName property name to add listener for
222:             * @param l new listener.
223:             */
224:            public final void addPropertyChangeListener(String propertyName,
225:                    PropertyChangeListener l) {
226:                myPcs.addPropertyChangeListener(propertyName, l);
227:            }
228:
229:            /**
230:             * Removes property change listener.
231:             *
232:             * @param propertyName property name to remove listener for
233:             * @param l listener to remove
234:             */
235:            public final void removePropertyChangeListener(String propertyName,
236:                    PropertyChangeListener l) {
237:                myPcs.removePropertyChangeListener(propertyName, l);
238:            }
239:
240:            /**
241:             * Returns the context of the debugger.
242:             *
243:             * @return the context of the debugger
244:             */
245:            public final ContextProvider getLookupProvider() {
246:                return myLookupProvider;
247:            }
248:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.