Source Code Cross Referenced for PollTableEntry.java in  » ESB » synapse » org » apache » synapse » transport » vfs » 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 » ESB » synapse » org.apache.synapse.transport.vfs 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Licensed to the Apache Software Foundation (ASF) under one
003:         *  or more contributor license agreements.  See the NOTICE file
004:         *  distributed with this work for additional information
005:         *  regarding copyright ownership.  The ASF licenses this file
006:         *  to you under the Apache License, Version 2.0 (the
007:         *  "License"); you may not use this file except in compliance
008:         *  with the License.  You may obtain a copy of the License at
009:         *
010:         *   http://www.apache.org/licenses/LICENSE-2.0
011:         *
012:         *  Unless required by applicable law or agreed to in writing,
013:         *  software distributed under the License is distributed on an
014:         *   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015:         *  KIND, either express or implied.  See the License for the
016:         *  specific language governing permissions and limitations
017:         *  under the License.
018:         */
019:        package org.apache.synapse.transport.vfs;
020:
021:        import java.text.SimpleDateFormat;
022:        import java.text.DateFormat;
023:
024:        /**
025:         * Holds information about an entry in the VFS transport poll table used by the
026:         * VFS Transport Listener
027:         */
028:        public class PollTableEntry {
029:
030:            // status of last scan
031:            public static final int SUCCSESSFUL = 0;
032:            public static final int WITH_ERRORS = 1;
033:            public static final int FAILED = 2;
034:            public static final int NONE = 3;
035:
036:            // operation after scan
037:            public static final int DELETE = 0;
038:            public static final int MOVE = 1;
039:
040:            /** Axis2 service name */
041:            private String serviceName;
042:            /** File or Directory to scan */
043:            private String fileURI;
044:            /** file name pattern for a directory or compressed file entry */
045:            private String fileNamePattern;
046:            /** Content-Type to use for the message */
047:            private String contentType;
048:
049:            /** last poll performed at */
050:            private long lastPollTime;
051:            /** duration in ms between successive polls */
052:            private long pollInterval;
053:            /** next poll time */
054:            private long nextPollTime;
055:            /** state of the last poll */
056:            private int lastPollState;
057:            /** action to take after a successful poll */
058:            private int actionAfterProcess = DELETE;
059:            /** action to take after a poll with errors */
060:            private int actionAfterErrors = DELETE;
061:            /** action to take after a failed poll */
062:            private int actionAfterFailure = DELETE;
063:
064:            /** where to move the file after processing */
065:            private String moveAfterProcess;
066:            /** where to move the file after encountering some errors */
067:            private String moveAfterErrors;
068:            /** where to move the file after total failure */
069:            private String moveAfterFailure;
070:            /** moved file will have this formatted timestamp prefix */
071:            private DateFormat moveTimestampFormat;
072:
073:            private int maxRetryCount;
074:            private long reconnectTimeout;
075:
076:            public String getServiceName() {
077:                return serviceName;
078:            }
079:
080:            public void setServiceName(String serviceName) {
081:                this .serviceName = serviceName;
082:            }
083:
084:            public String getFileURI() {
085:                return fileURI;
086:            }
087:
088:            public void setFileURI(String fileURI) {
089:                if (fileURI.startsWith(VFSConstants.VFS_PREFIX)) {
090:                    this .fileURI = fileURI.substring(VFSConstants.VFS_PREFIX
091:                            .length());
092:                } else {
093:                    this .fileURI = fileURI;
094:                }
095:            }
096:
097:            public String getFileNamePattern() {
098:                return fileNamePattern;
099:            }
100:
101:            public void setFileNamePattern(String fileNamePattern) {
102:                this .fileNamePattern = fileNamePattern;
103:            }
104:
105:            public String getContentType() {
106:                return contentType;
107:            }
108:
109:            public void setContentType(String contentType) {
110:                this .contentType = contentType;
111:            }
112:
113:            public long getLastPollTime() {
114:                return lastPollTime;
115:            }
116:
117:            public void setLastPollTime(long lastPollTime) {
118:                this .lastPollTime = lastPollTime;
119:            }
120:
121:            public long getPollInterval() {
122:                return pollInterval;
123:            }
124:
125:            public void setPollInterval(long pollInterval) {
126:                this .pollInterval = pollInterval;
127:            }
128:
129:            public long getNextPollTime() {
130:                return nextPollTime;
131:            }
132:
133:            public void setNextPollTime(long nextPollTime) {
134:                this .nextPollTime = nextPollTime;
135:            }
136:
137:            public int getLastPollState() {
138:                return lastPollState;
139:            }
140:
141:            public void setLastPollState(int lastPollState) {
142:                this .lastPollState = lastPollState;
143:            }
144:
145:            public int getActionAfterProcess() {
146:                return actionAfterProcess;
147:            }
148:
149:            public void setActionAfterProcess(int actionAfterProcess) {
150:                this .actionAfterProcess = actionAfterProcess;
151:            }
152:
153:            public int getActionAfterErrors() {
154:                return actionAfterErrors;
155:            }
156:
157:            public void setActionAfterErrors(int actionAfterErrors) {
158:                this .actionAfterErrors = actionAfterErrors;
159:            }
160:
161:            public int getActionAfterFailure() {
162:                return actionAfterFailure;
163:            }
164:
165:            public void setActionAfterFailure(int actionAfterFailure) {
166:                this .actionAfterFailure = actionAfterFailure;
167:            }
168:
169:            public String getMoveAfterProcess() {
170:                return moveAfterProcess;
171:            }
172:
173:            public void setMoveAfterProcess(String moveAfterProcess) {
174:                if (moveAfterProcess == null) {
175:                    this .moveAfterProcess = null;
176:                } else if (moveAfterProcess.startsWith(VFSConstants.VFS_PREFIX)) {
177:                    // to recover a good directory location if user entered with the vfs: prefix
178:                    // because transport uris are given like that
179:                    this .moveAfterProcess = moveAfterProcess
180:                            .substring(VFSConstants.VFS_PREFIX.length());
181:                } else {
182:                    this .moveAfterProcess = moveAfterProcess;
183:                }
184:            }
185:
186:            public String getMoveAfterErrors() {
187:                return moveAfterErrors;
188:            }
189:
190:            public void setMoveAfterErrors(String moveAfterErrors) {
191:                if (moveAfterErrors == null) {
192:                    this .moveAfterErrors = null;
193:                } else if (moveAfterErrors.startsWith(VFSConstants.VFS_PREFIX)) {
194:                    this .moveAfterErrors = moveAfterErrors
195:                            .substring(VFSConstants.VFS_PREFIX.length());
196:                } else {
197:                    this .moveAfterErrors = moveAfterErrors;
198:                }
199:            }
200:
201:            public String getMoveAfterFailure() {
202:                return moveAfterFailure;
203:            }
204:
205:            public void setMoveAfterFailure(String moveAfterFailure) {
206:                if (moveAfterFailure == null) {
207:                    this .moveAfterFailure = null;
208:                } else if (moveAfterFailure.startsWith(VFSConstants.VFS_PREFIX)) {
209:                    this .moveAfterFailure = moveAfterFailure
210:                            .substring(VFSConstants.VFS_PREFIX.length());
211:                } else {
212:                    this .moveAfterFailure = moveAfterFailure;
213:                }
214:            }
215:
216:            public int getMaxRetryCount() {
217:                return maxRetryCount;
218:            }
219:
220:            public void setMaxRetryCount(int maxRetryCount) {
221:                this .maxRetryCount = maxRetryCount;
222:            }
223:
224:            public long getReconnectTimeout() {
225:                return reconnectTimeout;
226:            }
227:
228:            public void setReconnectTimeout(long reconnectTimeout) {
229:                this .reconnectTimeout = reconnectTimeout;
230:            }
231:
232:            public DateFormat getMoveTimestampFormat() {
233:                return moveTimestampFormat;
234:            }
235:
236:            public void setMoveTimestampFormat(DateFormat moveTimestampFormat) {
237:                this.moveTimestampFormat = moveTimestampFormat;
238:            }
239:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.