Java Doc for JConnection.java in  » J2EE » JOnAS-4.8.6 » org » objectweb » jonas_jms » 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 » J2EE » JOnAS 4.8.6 » org.objectweb.jonas_jms 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.objectweb.jonas_jms.JConnection

All known Subclasses:   org.objectweb.jonas_jms.JTopicConnection,  org.objectweb.jonas_jms.JQueueConnection,
JConnection
public class JConnection implements Connection(Code)
Common methods used in JQueueConnection and JTopicConnection.
author:
   Laurent Chauvirey, Frederic Maistre, Nicolas Tachker
author:
   Contributor(s):
author:
   Philippe Durieux
author:
   Jeff Mesnil connection anonymous
author:
   Philippe Coq JMS 1.1 integration


Field Summary
final protected static  StringINTERNAL_USER_NAME
    
protected  booleanclosed
    
protected  booleanglobaltx
    
protected  JConnectionFactoryjcf
    
protected  LinkedListsessionlist
    
protected static  TransactionManagertm
    
protected  Stringuser
    
protected  XAConnectionxac
    

Constructor Summary
protected  JConnection(JConnectionFactory jcf, String user)
     Prepares the construction of a JConnection.
public  JConnection(JConnectionFactory jcf, XAConnectionFactory xacf, String user, String passwd)
     Constructor of a JConnection for a specified user.
public  JConnection(JConnectionFactory jcf, XAConnectionFactory xacf)
     Constructor of a JConnection for an anonymous user.

Method Summary
public  voidclose()
     When this method is invoked it should not return until message processing has been orderly shut down.
public  ConnectionConsumercreateConnectionConsumer(Destination destination, java.lang.String messageSelector, ServerSessionPool sessionPool, int maxMessages)
    
public  ConnectionConsumercreateDurableConnectionConsumer(Topic topic, java.lang.String subscriptionName, java.lang.String messageSelector, ServerSessionPool sessionPool, int maxMessages)
    
public  SessioncreateSession(boolean transacted, int acknowledgeMode)
     Creates a Session object.
Parameters:
  transacted - - indicates whether the session is transacted
Parameters:
  acknowledgeMode - indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted.
public  voidfinalClose()
    
public  StringgetClientID()
     Get the client identifier for this connection.
public  ExceptionListenergetExceptionListener()
     Get the ExceptionListener for this Connection.
public  ConnectionMetaDatagetMetaData()
     Get the meta data for this connection.
public  StringgetUser()
    
protected synchronized  voidsessionClose(Session s)
    
protected synchronized  booleansessionOpen(Session s)
    
public  voidsetClientID(String clientID)
     Set the client identifier for this connection.
public  voidsetExceptionListener(ExceptionListener listener)
     Set an exception listener for this connection.
public  voidstart()
     Start (or restart) a Connection's delivery of incoming messages.
public  voidstop()
     Used to temporarily stop a Connection's delivery of incoming messages.

Field Detail
INTERNAL_USER_NAME
final protected static String INTERNAL_USER_NAME(Code)



closed
protected boolean closed(Code)



globaltx
protected boolean globaltx(Code)



jcf
protected JConnectionFactory jcf(Code)



sessionlist
protected LinkedList sessionlist(Code)



tm
protected static TransactionManager tm(Code)



user
protected String user(Code)



xac
protected XAConnection xac(Code)




Constructor Detail
JConnection
protected JConnection(JConnectionFactory jcf, String user) throws JMSException(Code)
Prepares the construction of a JConnection.



JConnection
public JConnection(JConnectionFactory jcf, XAConnectionFactory xacf, String user, String passwd) throws JMSException(Code)
Constructor of a JConnection for a specified user.
Parameters:
  user - user's name
Parameters:
  passwd - user's password



JConnection
public JConnection(JConnectionFactory jcf, XAConnectionFactory xacf) throws JMSException(Code)
Constructor of a JConnection for an anonymous user.




Method Detail
close
public void close() throws JMSException(Code)
When this method is invoked it should not return until message processing has been orderly shut down. This means that all message listeners that may have been running have returned and that all pending receives have returned. A close terminates all pending message receives on the connection's sessions' consumers.
throws:
  JMSException - - if JMS implementation fails to return the client ID for this Connection due to some internal



createConnectionConsumer
public ConnectionConsumer createConnectionConsumer(Destination destination, java.lang.String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException(Code)
Creates a connection consumer for this connection (optional operation)
Parameters:
  destination - - the destination to access
Parameters:
  messageSelector - - only messages with properties matching the message selector expression are delivered.A value of null or an empty string indicates that there is no message selector for the message consumer.
Parameters:
  sessionPool - - the server session pool to associate with this connection consumer
Parameters:
  maxMessages - - the maximum number of messages that can be assigned to a server session at one time the connection consumer



createDurableConnectionConsumer
public ConnectionConsumer createDurableConnectionConsumer(Topic topic, java.lang.String subscriptionName, java.lang.String messageSelector, ServerSessionPool sessionPool, int maxMessages) throws JMSException(Code)
Creates a connection consumer for this connection (optional operation)
Parameters:
  topic - - the topic to access
Parameters:
  subscriptionName - - durable subscription name
Parameters:
  messageSelector - - only messages with properties matching the message selector expression are delivered.A value of null or an empty string indicates that there is no message selector for the message consumer.
Parameters:
  sessionPool - - the server session pool to associate with this connection consumer
Parameters:
  maxMessages - - the maximum number of messages that can be assigned to a server session at one time the durable connection consumer



createSession
public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException(Code)
Creates a Session object.
Parameters:
  transacted - - indicates whether the session is transacted
Parameters:
  acknowledgeMode - indicates whether the consumer or the client will acknowledge any messages it receives; ignored if the session is transacted. Legal values are Session.AUTO_ACKNOWLEDGE, Session.CLIENT_ACKNOWLEDGE, and Session.DUPS_OK_ACKNOWLEDGE.



finalClose
public void finalClose() throws JMSException(Code)



getClientID
public String getClientID() throws JMSException(Code)
Get the client identifier for this connection. This value is JMS Provider specific. Either pre-configured by an administrator in a ConnectionFactory or assigned dynamically by the application by calling setClientID method. the unique client identifier.
throws:
  JMSException - - if JMS implementation fails to return the client ID for this Connection due to some internal



getExceptionListener
public ExceptionListener getExceptionListener() throws JMSException(Code)
Get the ExceptionListener for this Connection. the ExceptionListener for this Connection.
throws:
  JMSException - - general exception if JMS implementation fails to get the Exception listener for this Connection.



getMetaData
public ConnectionMetaData getMetaData() throws JMSException(Code)
Get the meta data for this connection. the connection meta data.
throws:
  JMSException - - general exception if JMS implementation fails to get the Connection meta-data for this Connection.



getUser
public String getUser()(Code)
Return the user associated to this connection



sessionClose
protected synchronized void sessionClose(Session s)(Code)
A non transacted session has beem closed



sessionOpen
protected synchronized boolean sessionOpen(Session s)(Code)
A new non transacted session has been opened



setClientID
public void setClientID(String clientID) throws JMSException(Code)
Set the client identifier for this connection. If another connection with clientID is already running when this method is called, the JMS Provider should detect the duplicate id and throw InvalidClientIDException.
Parameters:
  clientID - - the unique client identifier
throws:
  JMSException - - general exception if JMS implementation fails to set the client ID for this Connection due to some internal error.
throws:
  InvalidClientIDException - - if JMS client specifies an invalid or duplicate client id.
throws:
  IllegalStateException - - if attempting to set a connection's client identifier at the wrong time or when it has been administratively configured.



setExceptionListener
public void setExceptionListener(ExceptionListener listener) throws JMSException(Code)
Set an exception listener for this connection.
Parameters:
  listener - - the exception listener.
throws:
  JMSException - - general exception if JMS implementation fails to set the Exception listener for this Connection.



start
public void start() throws JMSException(Code)
Start (or restart) a Connection's delivery of incoming messages.
throws:
  JMSException - - if JMS implementation fails to start the message delivery due to some internal error.



stop
public void stop() throws JMSException(Code)
Used to temporarily stop a Connection's delivery of incoming messages. It can be restarted using its start method. When stopped, delivery to all the Connection's message consumers is inhibited: synchronous receive's block and messages are not delivered to message listeners.
throws:
  JMSException - - if JMS implementation fails to start the message delivery due to some internal error.



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.