Java Doc for PersistChanGrpMgr.java in  » RSS-RDF » informa » de » nava » informa » utils » 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 » RSS RDF » informa » de.nava.informa.utils 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.nava.informa.utils.PersistChanGrpMgr

PersistChanGrpMgr
public class PersistChanGrpMgr (Code)
PersistChanGrpMgr - Controls and Manages a single Hibernate based Informa ChannelGroup. Provides for threaded Updating of the Channel Group, persistence management, session management etc. N O T T H R E A D S A F E


Field Summary
 intacceptNrErrors
    
 inttaskPeriod
    
 inttaskStartDelay
    

Constructor Summary
public  PersistChanGrpMgr(SessionHandler handler, boolean debug)
     Constructor.
Parameters:
  handler - - SessionHandler to use.

Method Summary
public synchronized  voidactivate()
    
public  ChanneladdChannel(String url)
     Add a channel to this Persisten Channel Group.
public  IteratorchannelIterator()
     Create an iterator to iterate across all the channels in this group.
public  ChannelGroupcreateGroup(String name)
     Called to create a Group.
public synchronized  voiddeActivate()
     Interrupts the update task and return immediately.
public synchronized  voiddeActivate(boolean waitForFinish)
     Interrupts the update task and return immediately.
public  booleandeleteChannel(Channel channel)
     Delete specified channel from this PersistChanGrpMgr.
public  voiddeleteGroup()
     Deletes persistent group.
public  intdeleteItemFromChannel(Channel channel, Item item)
    
public  intgetAcceptNrErrors()
    
public  ChannelBuildergetBuilder()
    
public  ChannelGroupgetChannelGroup()
    
public  SessionHandlergetHandler()
    
public  intgetItemCount(Channel channel)
    
public  intgetPollingCounter()
    
public  booleanhasChannel(Channel achannel)
    
public  voidincrPollingCounter()
     Bump up polling counter by one.
public  booleanisActivated()
     Simply return whether we are currently activated (that is, running the tasks that download and process RSS.
public  voidmoveChannelTo(Channel channel, PersistChanGrpMgr destGrp)
    
public  voidnotifyChannelRetrieved(Channel chan)
     Send notification that specified channel was retrieved.
public  voidnotifyChannels()
    
public  voidnotifyChannelsAndItems(Channel channel)
     notifyChannelsAndItems - Notify both item and channel listeners for a channel and all its items.
public  voidnotifyChannelsAndItems()
     notifyChannelsAndItems - Call notifyChannelAndItems(channels) across all channels in this PersistentChanGrpMgr.
public  voidnotifyItemAdded(Item newItem)
     Send notification that specified item was retrieved.
public  voidnotifyItems(Channel channelHandle)
     Send notifications for all the items of this channel that they have been added.
public  voidnotifyPolling(boolean isPolling)
     Notify that the PersistChanGrpMgrTask is currently in the middle of its 'run()' method.
public  voidsetGlobalObserver(PersistChanGrpMgrObserverIF obser)
     Setup the one and only Global observer.
public  voidsetParams(int startDel, int period, int acceptErr)
     Change parameters of how this PersistChanGrpMgr works.
public  StringtoString()
    

Field Detail
acceptNrErrors
int acceptNrErrors(Code)



taskPeriod
int taskPeriod(Code)



taskStartDelay
int taskStartDelay(Code)




Constructor Detail
PersistChanGrpMgr
public PersistChanGrpMgr(SessionHandler handler, boolean debug)(Code)
Constructor.
Parameters:
  handler - - SessionHandler to use. This needs to have been built by caller.
Parameters:
  debug - - - true will run this in debug mode, which basically means that threads are runwith no delays thereby revealing threading bugs.




Method Detail
activate
public synchronized void activate()(Code)
activate - -



addChannel
public Channel addChannel(String url)(Code)
Add a channel to this Persisten Channel Group. If Channel already exists then just add it, if it doesn't then create it and add it.
Parameters:
  url - the url of the rss feed Channel so created or located



channelIterator
public Iterator channelIterator()(Code)
Create an iterator to iterate across all the channels in this group. the iterator



createGroup
public ChannelGroup createGroup(String name)(Code)
Called to create a Group.
Parameters:
  name - - Text name of the group - Channel Group being managed by this PersistChanGrpMgr



deActivate
public synchronized void deActivate()(Code)
Interrupts the update task and return immediately. Do not waits for task to stop.



deActivate
public synchronized void deActivate(boolean waitForFinish)(Code)
Interrupts the update task and return immediately. Waits for task to finish if waitForFinish argument set.
Parameters:
  waitForFinish - TRUE to wait until task actually finishes.



deleteChannel
public boolean deleteChannel(Channel channel)(Code)
Delete specified channel from this PersistChanGrpMgr. Status indicates whether Channel was previously part of this group.
Parameters:
  channel - - Channel being removed from the Group. true if channel was deleted, false if channel was not a member to begin with



deleteGroup
public void deleteGroup()(Code)
Deletes persistent group.



deleteItemFromChannel
public int deleteItemFromChannel(Channel channel, Item item)(Code)
Delete specified item from specified Channel
Parameters:
  channel - - Channel to delete from
Parameters:
  item - - Item to delete from that channel number of items left in the channel AFTER the deletion.



getAcceptNrErrors
public int getAcceptNrErrors()(Code)
acceptable number of errors



getBuilder
public ChannelBuilder getBuilder()(Code)
Get currently associated ChannelBuilder the current cb



getChannelGroup
public ChannelGroup getChannelGroup()(Code)
Get currently assocaited ChannelGrouo the cg



getHandler
public SessionHandler getHandler()(Code)
Get currently assocaited SessionHandler the sh



getItemCount
public int getItemCount(Channel channel)(Code)
Return number of Items currently in specified Channel
Parameters:
  channel - Channel to query number of Items



getPollingCounter
public int getPollingCounter()(Code)
Return how many times the task has polled the feed since this PersistChanGrp was built polling count so far



hasChannel
public boolean hasChannel(Channel achannel)(Code)
Check if this PersistChanGrp has specified CHannel as a member already
Parameters:
  achannel - - candidate channel to check TRUE = yes



incrPollingCounter
public void incrPollingCounter()(Code)
Bump up polling counter by one.



isActivated
public boolean isActivated()(Code)
Simply return whether we are currently activated (that is, running the tasks that download and process RSS. Will also return true if the PersistChanGrpMgrTask is still in the middle of finishing. true = activated



moveChannelTo
public void moveChannelTo(Channel channel, PersistChanGrpMgr destGrp)(Code)
Move a Channel from this PersistentChannelGroup to a different one
Parameters:
  channel - channel in this PersistentChannelGroup that is being moved.
Parameters:
  destGrp - destination where the Channel is going to



notifyChannelRetrieved
public void notifyChannelRetrieved(Channel chan)(Code)
Send notification that specified channel was retrieved.
Parameters:
  chan - -



notifyChannels
public void notifyChannels()(Code)
Send notifications about all Channels in this group (but not their items) -



notifyChannelsAndItems
public void notifyChannelsAndItems(Channel channel)(Code)
notifyChannelsAndItems - Notify both item and channel listeners for a channel and all its items. This is useful if the client wants to treat a Channel that was recently read in by hibernate in a consistent way with listeners.
Parameters:
  channel - - Relevant channel.



notifyChannelsAndItems
public void notifyChannelsAndItems()(Code)
notifyChannelsAndItems - Call notifyChannelAndItems(channels) across all channels in this PersistentChanGrpMgr.



notifyItemAdded
public void notifyItemAdded(Item newItem)(Code)
Send notification that specified item was retrieved.
Parameters:
  newItem - -



notifyItems
public void notifyItems(Channel channelHandle)(Code)
Send notifications for all the items of this channel that they have been added.
Parameters:
  channelHandle - -



notifyPolling
public void notifyPolling(boolean isPolling)(Code)
Notify that the PersistChanGrpMgrTask is currently in the middle of its 'run()' method.
Parameters:
  isPolling - true - start polling, false- end



setGlobalObserver
public void setGlobalObserver(PersistChanGrpMgrObserverIF obser)(Code)
Setup the one and only Global observer. Note this is not an observer chain, but just a single one.
Parameters:
  obser - Observer to register



setParams
public void setParams(int startDel, int period, int acceptErr)(Code)
Change parameters of how this PersistChanGrpMgr works. Only allowed when this PersistChanGrp is inactive.
Parameters:
  startDel - ms before starting (-1 means don't change.)
Parameters:
  period - ms between iterations (-1 means don't change.)
Parameters:
  acceptErr - number of errors before putting a channel offline (-1 means don't change)



toString
public String toString()(Code)
Return nicely formatted string for this object - the string



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.