Java Doc for Store.java in  » EJB-Server-GlassFish » mail » javax » mail » 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 » EJB Server GlassFish » mail » javax.mail 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.mail.Service
      javax.mail.Store

All known Subclasses:   com.sun.mail.pop3.POP3Store,  com.sun.mail.imap.IMAPStore,
Store
abstract public class Store extends Service (Code)
An abstract class that models a message store and its access protocol, for storing and retrieving messages. Subclasses provide actual implementations.

Note that Store extends the Service class, which provides many common methods for naming stores, connecting to stores, and listening to connection events.
author:
   John Mani
author:
   Bill Shannon
version:
   1.28, 07/05/04
See Also:   javax.mail.Service
See Also:   javax.mail.event.ConnectionEvent
See Also:   javax.mail.event.StoreEvent




Constructor Summary
protected  Store(Session session, URLName urlname)
     Constructor.

Method Summary
public synchronized  voidaddFolderListener(FolderListener l)
     Add a listener for Folder events on any Folder object obtained from this Store.
public synchronized  voidaddStoreListener(StoreListener l)
     Add a listener for StoreEvents on this Store.
abstract public  FoldergetDefaultFolder()
     Returns a Folder object that represents the 'root' of the default namespace presented to the user by the Store.
abstract public  FoldergetFolder(String name)
     Return the Folder object corresponding to the given name.
abstract public  FoldergetFolder(URLName url)
     Return a closed Folder object, corresponding to the given URLName.
public  Folder[]getPersonalNamespaces()
     Return a set of folders representing the personal namespaces for the current user.
public  Folder[]getSharedNamespaces()
     Return a set of folders representing the shared namespaces. A shared namespace is a namespace that consists of mail folders that are intended to be shared amongst users and do not exist within a user's personal namespace.
public  Folder[]getUserNamespaces(String user)
     Return a set of folders representing the namespaces for user.
protected  voidnotifyFolderListeners(int type, Folder folder)
     Notify all FolderListeners.
protected  voidnotifyFolderRenamedListeners(Folder oldF, Folder newF)
     Notify all FolderListeners about the renaming of a folder. Store implementations are expected to use this method to broadcast Folder events indicating the renaming of folders.
protected  voidnotifyStoreListeners(int type, String message)
     Notify all StoreListeners.
public synchronized  voidremoveFolderListener(FolderListener l)
     Remove a listener for Folder events.
public synchronized  voidremoveStoreListener(StoreListener l)
     Remove a listener for Store events.


Constructor Detail
Store
protected Store(Session session, URLName urlname)(Code)
Constructor.
Parameters:
  session - Session object for this Store.
Parameters:
  urlname - URLName object to be used for this Store




Method Detail
addFolderListener
public synchronized void addFolderListener(FolderListener l)(Code)
Add a listener for Folder events on any Folder object obtained from this Store. FolderEvents are delivered to FolderListeners on the affected Folder as well as to FolderListeners on the containing Store.

The default implementation provided here adds this listener to an internal list of FolderListeners.
Parameters:
  l - the Listener for Folder events
See Also:   javax.mail.event.FolderEvent




addStoreListener
public synchronized void addStoreListener(StoreListener l)(Code)
Add a listener for StoreEvents on this Store.

The default implementation provided here adds this listener to an internal list of StoreListeners.
Parameters:
  l - the Listener for Store events
See Also:   javax.mail.event.StoreEvent




getDefaultFolder
abstract public Folder getDefaultFolder() throws MessagingException(Code)
Returns a Folder object that represents the 'root' of the default namespace presented to the user by the Store. the root Folder
exception:
  IllegalStateException - if this Store is not connected.



getFolder
abstract public Folder getFolder(String name) throws MessagingException(Code)
Return the Folder object corresponding to the given name. Note that a Folder object is returned even if the named folder does not physically exist on the Store. The exists() method on the folder object indicates whether this folder really exists.

Folder objects are not cached by the Store, so invoking this method on the same name multiple times will return that many distinct Folder objects.
Parameters:
  name - The name of the Folder. In some Stores, name canbe an absolute path if it starts with thehierarchy delimiter. Else it is interpretedrelative to the 'root' of this namespace. Folder object
exception:
  IllegalStateException - if this Store is not connected.
See Also:   Folder.exists
See Also:   Folder.create




getFolder
abstract public Folder getFolder(URLName url) throws MessagingException(Code)
Return a closed Folder object, corresponding to the given URLName. The store specified in the given URLName should refer to this Store object.

Implementations of this method may obtain the name of the actual folder using the getFile() method on URLName, and use that name to create the folder.
Parameters:
  url - URLName that denotes a folder
See Also:   URLName
exception:
  IllegalStateException - if this Store is not connected. Folder object




getPersonalNamespaces
public Folder[] getPersonalNamespaces() throws MessagingException(Code)
Return a set of folders representing the personal namespaces for the current user. A personal namespace is a set of names that is considered within the personal scope of the authenticated user. Typically, only the authenticated user has access to mail folders in their personal namespace. If an INBOX exists for a user, it must appear within the user's personal namespace. In the typical case, there should be only one personal namespace for each user in each Store.

This implementation returns an array with a single entry containing the return value of the getDefaultFolder method. Subclasses should override this method to return appropriate information.
exception:
  IllegalStateException - if this Store is not connected. array of Folder objects
since:
   JavaMail 1.2




getSharedNamespaces
public Folder[] getSharedNamespaces() throws MessagingException(Code)
Return a set of folders representing the shared namespaces. A shared namespace is a namespace that consists of mail folders that are intended to be shared amongst users and do not exist within a user's personal namespace.

This implementation returns an empty array. Subclasses should override this method to return appropriate information.
exception:
  IllegalStateException - if this Store is not connected. array of Folder objects
since:
   JavaMail 1.2




getUserNamespaces
public Folder[] getUserNamespaces(String user) throws MessagingException(Code)
Return a set of folders representing the namespaces for user. The namespaces returned represent the personal namespaces for the user. To access mail folders in the other user's namespace, the currently authenticated user must be explicitly granted access rights. For example, it is common for a manager to grant to their secretary access rights to their mail folders.

This implementation returns an empty array. Subclasses should override this method to return appropriate information.
exception:
  IllegalStateException - if this Store is not connected. array of Folder objects
since:
   JavaMail 1.2




notifyFolderListeners
protected void notifyFolderListeners(int type, Folder folder)(Code)
Notify all FolderListeners. Store implementations are expected to use this method to broadcast Folder events.

The provided default implementation queues the event into an internal event queue. An event dispatcher thread dequeues events from the queue and dispatches them to the registered FolderListeners. Note that the event dispatching occurs in a separate thread, thus avoiding potential deadlock problems.
Parameters:
  type - type of FolderEvent
Parameters:
  folder - affected Folder
See Also:   Store.notifyFolderRenamedListeners




notifyFolderRenamedListeners
protected void notifyFolderRenamedListeners(Folder oldF, Folder newF)(Code)
Notify all FolderListeners about the renaming of a folder. Store implementations are expected to use this method to broadcast Folder events indicating the renaming of folders.

The provided default implementation queues the event into an internal event queue. An event dispatcher thread dequeues events from the queue and dispatches them to the registered FolderListeners. Note that the event dispatching occurs in a separate thread, thus avoiding potential deadlock problems.
Parameters:
  oldF - the folder being renamed
Parameters:
  newF - the folder representing the new name.
since:
   JavaMail 1.1




notifyStoreListeners
protected void notifyStoreListeners(int type, String message)(Code)
Notify all StoreListeners. Store implementations are expected to use this method to broadcast StoreEvents.

The provided default implementation queues the event into an internal event queue. An event dispatcher thread dequeues events from the queue and dispatches them to the registered StoreListeners. Note that the event dispatching occurs in a separate thread, thus avoiding potential deadlock problems.




removeFolderListener
public synchronized void removeFolderListener(FolderListener l)(Code)
Remove a listener for Folder events.

The default implementation provided here removes this listener from the internal list of FolderListeners.
Parameters:
  l - the listener
See Also:   Store.addFolderListener




removeStoreListener
public synchronized void removeStoreListener(StoreListener l)(Code)
Remove a listener for Store events.

The default implementation provided here removes this listener from the internal list of StoreListeners.
Parameters:
  l - the listener
See Also:   Store.addStoreListener




Fields inherited from javax.mail.Service
protected boolean debug(Code)(Java Doc)
protected Session session(Code)(Java Doc)
protected URLName url(Code)(Java Doc)

Methods inherited from javax.mail.Service
public synchronized void addConnectionListener(ConnectionListener l)(Code)(Java Doc)
public synchronized void close() throws MessagingException(Code)(Java Doc)
public void connect() throws MessagingException(Code)(Java Doc)
public void connect(String host, String user, String password) throws MessagingException(Code)(Java Doc)
public void connect(String user, String password) throws MessagingException(Code)(Java Doc)
public synchronized void connect(String host, int port, String user, String password) throws MessagingException(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
public synchronized URLName getURLName()(Code)(Java Doc)
public synchronized boolean isConnected()(Code)(Java Doc)
protected synchronized void notifyConnectionListeners(int type)(Code)(Java Doc)
protected boolean protocolConnect(String host, int port, String user, String password) throws MessagingException(Code)(Java Doc)
protected void queueEvent(MailEvent event, Vector vector)(Code)(Java Doc)
public synchronized void removeConnectionListener(ConnectionListener l)(Code)(Java Doc)
protected synchronized void setConnected(boolean connected)(Code)(Java Doc)
protected synchronized void setURLName(URLName url)(Code)(Java Doc)
public String toString()(Code)(Java Doc)

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.