Java Doc for MessageExchangeProxy.java in  » ESB » open-esb » com » sun » jbi » messaging » 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 » open esb » com.sun.jbi.messaging 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.jbi.messaging.MessageExchangeProxy

All known Subclasses:   com.sun.jbi.messaging.InOnlyImpl,  com.sun.jbi.messaging.InOptionalOutImpl,  com.sun.jbi.messaging.Observer,  com.sun.jbi.messaging.InOutImpl,  com.sun.jbi.messaging.RobustInOnlyImpl,
MessageExchangeProxy
abstract public class MessageExchangeProxy implements com.sun.jbi.messaging.MessageExchange(Code)
This abstract class is used as the base for a MessageExchange reference given to a Binding or Engine. The binding and engine are given different instances, because the states naviagated during execution are different. Each instance also tracks its twin. It's mostly just a proxy to the underlying MessageExchangeImpl. The proxy tracks the status of the reference to determine which operations are legal at any point in time. Legal operations are forwarded to the underlying MessageExchangeImpl. Each subclass is expected to specify a state machine that will be used by this proxy to sequence the actions. The state machine is very simple. There are only 4 actions: SEND, ACCEPT, SET_STATUS, SET_FAULT. Along with each state there is a set (implemented as a bit-mask) of operations that are legal in the current state. The structure is represented as a simple [][]. The first dimension is the array of states, the second dimension contains the valid set, followed by the next array index for each action. An index of -1 means an illegal request (the code in here should only request legal transisions.) Each subclass implements 2 state machines, one for the SOURCE side and one for the TARGET side of a message exchange.
author:
   Sun Microsystems, Inc.


Field Summary
final public static  intACTION_ACCEPT
    
final public static  intACTION_FAULT
    
final public static  intACTION_MASK
     Column 1: Legal operation MASK.
final public static  intACTION_SEND
    
final public static  intACTION_STATUS
    
final public static  intADDRESS
    
final public static  intCHECK_STATUS_OR_FAULT
    
final public static  intCOMPLETE
    
final public static  intCREATE_FAULT
     Allowed to create fault.
final static  intDONE
    
final public static  intDO_ACCEPT
    
final public static  intDO_SEND
    
final public static  intDO_SENDSYNCH
     Allowed to SENDSYNCH.
final static  intERROR
    
final static  intHALF_DONE
    
final static  StringIN_MSG
     Name of IN message.
final public static  intMARK_ACTIVE
    
final public static  intMARK_DONE
    
final static  intNONE
    
final static  StringOUT_MSG
     Name of OUT message.
final static  intPHASE_DONE
    
final static  intPHASE_ERROR
    
final static  intPHASE_FAULT
    
final static  intPHASE_NONE
    
final static  intPHASE_REPLY
    
final static  intPHASE_REQUEST
    
final static  intPM_RECEIVE_DONE
    
final static  intPM_RECEIVE_ERROR
    
final static  intPM_RECEIVE_FAULT
    
final static  intPM_RECEIVE_REPLY
    
final static  intPM_RECEIVE_REQUEST
    
final static  intPM_SEND_DONE
    
final static  intPM_SEND_ERROR
    
final static  intPM_SEND_FAULT
    
final static  intPM_SEND_REPLY
    
final static  intPM_SEND_REQUEST
    
final public static  intREQUEST
     Hint is a REQUEST.
final public static  intRESUME_TX
    
final public static  intSET_DONE
     Allowed to set done status.
final public static  intSET_ERROR
     Allowed to set error status.
final public static  intSET_FAULT
     Allowed to set fault.
final public static  intSET_IN
    
final public static  intSET_OUT
    
final public static  intSET_PROPERTY
     Allowed to set property.
final public static  intSET_TRANSACTION
     Allowed to set transaction.
final public static  intSTATUS
     Hint is a STATUS.
final public static  intSUSPEND_TX
    
final static  intWAIT
    
final static  intWAIT_TIMEOUT
    

Constructor Summary
 MessageExchangeProxy(int[][] states)
     Constructor.

Method Summary
 voidafterCapabilityCheck()
    
 voidbeforeCapabilityCheck(ServiceEndpoint se)
    
 voidbindChannels(DeliveryChannelImpl source, DeliveryChannelImpl target)
     Bind source and target channels and create target MessageExchange.
 booleancapture(byte consumerTag, byte providerTag)
    
public  booleancheckTimeout()
    
public  FaultcreateFault()
     Create a Fault.
public  NormalizedMessagecreateMessage()
     Create a Message.
public  SetgetDeltaProperties()
    
public  ServiceEndpointgetEndpoint()
     Get the Endpoint for this exchange.
 ServiceEndpointgetEndpointLink()
    
public  ExceptiongetError()
     Get Exception describing the exchanges error status.
public  StringgetExchangeId()
     Get ExchangeId associated with this MessageExchange.
public  FaultgetFault()
     Get the Fault message for this exchange.
public  QNamegetInterfaceName()
    
public  NormalizedMessagegetMessage(String name)
     Get a NormalizedMEssage by reference.
 MessageExchangeImplgetMessageExchange()
     Get our MessageExchange.
public  QNamegetOperation()
     Get the Service for this exchange.
public  intgetPhase()
    
public  intgetPhaseMask()
    
public  ObjectgetProperty(String name)
     Get a property.
public  java.util.SetgetPropertyNames()
    
public  RolegetRole()
     Return the role to take in this exchange.
 DeliveryChannelImplgetSendChannel()
     Set the sendChannel.
public  QNamegetService()
     Get the Service for this exchange.
public  StringgetSourceComponent()
    
public  ExchangeStatusgetStatus()
     Get status of this MessageExchange.
 intgetSynchState()
    
public  StringgetTargetComponent()
    
 METimestampsgetTimestamps()
    
 MessageExchangeProxygetTwin()
     Get the identity of our twin.
 booleanhandleAccept(DeliveryChannelImpl channel)
     Handle any special processing after an accept().
 booleanhandleSend(DeliveryChannelImpl channel)
     Handle any special processing after an send().
 voidhandleSendSync(DeliveryChannelImpl channel)
     Handle any special processing after an sendSync().
public  booleanisRemoteInvocation()
    
 booleanisSource()
    
public  booleanisTransacted()
     Check existence of a transaction.
public  voidmergeProperties()
    
abstract  MessageExchangeProxynewTwin()
     Create a twin of ourselves in the target role.
 voidresetInUse()
    
public  voidsetEndpoint(ServiceEndpoint endPoint)
     Set Endpoint for this exchange.
 voidsetEndpointLink(ServiceEndpoint se)
    
public  voidsetError(Exception error)
     Set Exception describing reason for error status.
public  voidsetFault(Fault fault)
     Set Fault message for this exchange.
 voidsetInUse(String ownerId)
    
public  voidsetInterfaceName(QName interfaceName)
    
public  voidsetMessage(NormalizedMessage message, String name)
     Set a NormalizedMessage by reference.
 voidsetMessageExchange(MessageExchangeImpl me, boolean statsEnabled)
     Set our MessageExchange.
public  voidsetOperation(QName operation)
     Set Operation for this exchange.
public  voidsetProperty(String name, Object object)
     Set a property.
public  voidsetService(QName service)
     Set Service for this exchange.
public  voidsetStatus(ExchangeStatus status)
     Set status of this MessageExchange.
 voidsetSynchState(int state)
    
 voidsetTwin(MessageExchangeProxy mep)
     Set the identity of our twin.
public synchronized  booleanterminate()
     Force exchange into DONE state.
public  StringtoString()
    
 voidupdateStatistics()
    
 voidvalidate(DeliveryChannelImpl channel, boolean isSynch)
     Validate that we can send.

Field Detail
ACTION_ACCEPT
final public static int ACTION_ACCEPT(Code)
Column 3: Action ACCEPT



ACTION_FAULT
final public static int ACTION_FAULT(Code)
Column 5: Action FAULT



ACTION_MASK
final public static int ACTION_MASK(Code)
Column 1: Legal operation MASK.



ACTION_SEND
final public static int ACTION_SEND(Code)
Column 2: Action SEND



ACTION_STATUS
final public static int ACTION_STATUS(Code)
Column 4: Action STATUS



ADDRESS
final public static int ADDRESS(Code)
Category of actions used to address a message exchange: SET_SERVICE, SET_OPERATION, SET_ENDPOINT, SET_INTERFACE



CHECK_STATUS_OR_FAULT
final public static int CHECK_STATUS_OR_FAULT(Code)
Hint check STATUS or FAULT



COMPLETE
final public static int COMPLETE(Code)
Hint COMPLETE



CREATE_FAULT
final public static int CREATE_FAULT(Code)
Allowed to create fault.



DONE
final static int DONE(Code)



DO_ACCEPT
final public static int DO_ACCEPT(Code)
Allowed to ACCEPT



DO_SEND
final public static int DO_SEND(Code)
Allowed to SEND



DO_SENDSYNCH
final public static int DO_SENDSYNCH(Code)
Allowed to SENDSYNCH.



ERROR
final static int ERROR(Code)



HALF_DONE
final static int HALF_DONE(Code)



IN_MSG
final static String IN_MSG(Code)
Name of IN message.



MARK_ACTIVE
final public static int MARK_ACTIVE(Code)
Hint ACTIVE



MARK_DONE
final public static int MARK_DONE(Code)
Hint DONE



NONE
final static int NONE(Code)



OUT_MSG
final static String OUT_MSG(Code)
Name of OUT message.



PHASE_DONE
final static int PHASE_DONE(Code)



PHASE_ERROR
final static int PHASE_ERROR(Code)



PHASE_FAULT
final static int PHASE_FAULT(Code)



PHASE_NONE
final static int PHASE_NONE(Code)



PHASE_REPLY
final static int PHASE_REPLY(Code)



PHASE_REQUEST
final static int PHASE_REQUEST(Code)



PM_RECEIVE_DONE
final static int PM_RECEIVE_DONE(Code)



PM_RECEIVE_ERROR
final static int PM_RECEIVE_ERROR(Code)



PM_RECEIVE_FAULT
final static int PM_RECEIVE_FAULT(Code)



PM_RECEIVE_REPLY
final static int PM_RECEIVE_REPLY(Code)



PM_RECEIVE_REQUEST
final static int PM_RECEIVE_REQUEST(Code)



PM_SEND_DONE
final static int PM_SEND_DONE(Code)



PM_SEND_ERROR
final static int PM_SEND_ERROR(Code)



PM_SEND_FAULT
final static int PM_SEND_FAULT(Code)



PM_SEND_REPLY
final static int PM_SEND_REPLY(Code)



PM_SEND_REQUEST
final static int PM_SEND_REQUEST(Code)



REQUEST
final public static int REQUEST(Code)
Hint is a REQUEST.



RESUME_TX
final public static int RESUME_TX(Code)
Hint RESUME_TX



SET_DONE
final public static int SET_DONE(Code)
Allowed to set done status.



SET_ERROR
final public static int SET_ERROR(Code)
Allowed to set error status.



SET_FAULT
final public static int SET_FAULT(Code)
Allowed to set fault.



SET_IN
final public static int SET_IN(Code)
Allowed to set IN message



SET_OUT
final public static int SET_OUT(Code)
Allowed to set OUT message



SET_PROPERTY
final public static int SET_PROPERTY(Code)
Allowed to set property.



SET_TRANSACTION
final public static int SET_TRANSACTION(Code)
Allowed to set transaction.



STATUS
final public static int STATUS(Code)
Hint is a STATUS.



SUSPEND_TX
final public static int SUSPEND_TX(Code)
Hint SUSPEND_TX



WAIT
final static int WAIT(Code)



WAIT_TIMEOUT
final static int WAIT_TIMEOUT(Code)




Constructor Detail
MessageExchangeProxy
MessageExchangeProxy(int[][] states)(Code)
Constructor.




Method Detail
afterCapabilityCheck
void afterCapabilityCheck()(Code)



beforeCapabilityCheck
void beforeCapabilityCheck(ServiceEndpoint se)(Code)



bindChannels
void bindChannels(DeliveryChannelImpl source, DeliveryChannelImpl target)(Code)
Bind source and target channels and create target MessageExchange.



capture
boolean capture(byte consumerTag, byte providerTag)(Code)



checkTimeout
public boolean checkTimeout()(Code)



createFault
public Fault createFault() throws MessagingException(Code)
Create a Fault.



createMessage
public NormalizedMessage createMessage() throws MessagingException(Code)
Create a Message.



getDeltaProperties
public Set getDeltaProperties()(Code)



getEndpoint
public ServiceEndpoint getEndpoint()(Code)
Get the Endpoint for this exchange. If a service connection was used to address this exchange, that endpoint is returned to the consumer. The provider always sees the 'real' endpoint that it activated. If a service connection was not used, the provider and consumer see the same endpoint.



getEndpointLink
ServiceEndpoint getEndpointLink()(Code)



getError
public Exception getError()(Code)
Get Exception describing the exchanges error status.



getExchangeId
public String getExchangeId()(Code)
Get ExchangeId associated with this MessageExchange.



getFault
public Fault getFault()(Code)
Get the Fault message for this exchange.



getInterfaceName
public QName getInterfaceName()(Code)



getMessage
public NormalizedMessage getMessage(String name)(Code)
Get a NormalizedMEssage by reference.



getMessageExchange
MessageExchangeImpl getMessageExchange()(Code)
Get our MessageExchange.



getOperation
public QName getOperation()(Code)
Get the Service for this exchange.



getPhase
public int getPhase()(Code)



getPhaseMask
public int getPhaseMask()(Code)



getProperty
public Object getProperty(String name)(Code)
Get a property.



getPropertyNames
public java.util.Set getPropertyNames()(Code)



getRole
public Role getRole()(Code)
Return the role to take in this exchange.



getSendChannel
DeliveryChannelImpl getSendChannel()(Code)
Set the sendChannel.



getService
public QName getService()(Code)
Get the Service for this exchange.



getSourceComponent
public String getSourceComponent()(Code)



getStatus
public ExchangeStatus getStatus()(Code)
Get status of this MessageExchange.



getSynchState
int getSynchState()(Code)



getTargetComponent
public String getTargetComponent()(Code)



getTimestamps
METimestamps getTimestamps()(Code)



getTwin
MessageExchangeProxy getTwin()(Code)
Get the identity of our twin.



handleAccept
boolean handleAccept(DeliveryChannelImpl channel) throws javax.jbi.messaging.MessagingException(Code)
Handle any special processing after an accept(). boolean that signals if processing is complete.



handleSend
boolean handleSend(DeliveryChannelImpl channel) throws javax.jbi.messaging.MessagingException(Code)
Handle any special processing after an send(). boolean that signals if processing is complete.



handleSendSync
void handleSendSync(DeliveryChannelImpl channel) throws javax.jbi.messaging.MessagingException(Code)
Handle any special processing after an sendSync().



isRemoteInvocation
public boolean isRemoteInvocation()(Code)



isSource
boolean isSource()(Code)



isTransacted
public boolean isTransacted()(Code)
Check existence of a transaction.



mergeProperties
public void mergeProperties()(Code)



newTwin
abstract MessageExchangeProxy newTwin()(Code)
Create a twin of ourselves in the target role.



resetInUse
void resetInUse()(Code)



setEndpoint
public void setEndpoint(ServiceEndpoint endPoint)(Code)
Set Endpoint for this exchange.



setEndpointLink
void setEndpointLink(ServiceEndpoint se)(Code)



setError
public void setError(Exception error)(Code)
Set Exception describing reason for error status.



setFault
public void setFault(Fault fault) throws MessagingException(Code)
Set Fault message for this exchange.



setInUse
void setInUse(String ownerId)(Code)



setInterfaceName
public void setInterfaceName(QName interfaceName)(Code)



setMessage
public void setMessage(NormalizedMessage message, String name) throws MessagingException(Code)
Set a NormalizedMessage by reference.



setMessageExchange
void setMessageExchange(MessageExchangeImpl me, boolean statsEnabled)(Code)
Set our MessageExchange.



setOperation
public void setOperation(QName operation)(Code)
Set Operation for this exchange.



setProperty
public void setProperty(String name, Object object)(Code)
Set a property.



setService
public void setService(QName service)(Code)
Set Service for this exchange.



setStatus
public void setStatus(ExchangeStatus status) throws javax.jbi.messaging.MessagingException(Code)
Set status of this MessageExchange.



setSynchState
void setSynchState(int state)(Code)



setTwin
void setTwin(MessageExchangeProxy mep)(Code)
Set the identity of our twin.



terminate
public synchronized boolean terminate()(Code)
Force exchange into DONE state. Typically used after a sendSynch timeout or the closing of the source or target channel.



toString
public String toString()(Code)



updateStatistics
void updateStatistics()(Code)



validate
void validate(DeliveryChannelImpl channel, boolean isSynch) throws javax.jbi.messaging.MessagingException(Code)
Validate that we can send.



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.