1 22 package org.objectweb.petals.binding.xquarebc.mock; 23 24 import java.net.URI ; 25 import java.util.Set ; 26 27 import javax.jbi.messaging.ExchangeStatus; 28 import javax.jbi.messaging.Fault; 29 import javax.jbi.messaging.InOut; 30 import javax.jbi.messaging.MessagingException; 31 import javax.jbi.messaging.NormalizedMessage; 32 import javax.jbi.servicedesc.ServiceEndpoint; 33 import javax.xml.namespace.QName ; 34 35 40 public class MockInOut implements InOut { 41 42 public NormalizedMessage getInMessage() { 43 return null; 44 } 45 46 public NormalizedMessage getOutMessage() { 47 return out; 48 } 49 50 public void setInMessage(NormalizedMessage msg) throws MessagingException { 51 } 52 53 private NormalizedMessage out; 54 55 public void setOutMessage(NormalizedMessage msg) throws MessagingException { 56 out = msg; 57 } 58 59 public Fault createFault() throws MessagingException { 60 return null; 61 } 62 63 public NormalizedMessage createMessage() throws MessagingException { 64 return new MockNormalizedMessage(); 65 } 66 67 public ServiceEndpoint getEndpoint() { 68 return null; 69 } 70 71 public Exception getError() { 72 return null; 73 } 74 75 public String getExchangeId() { 76 return null; 77 } 78 79 public Fault getFault() { 80 return null; 81 } 82 83 public QName getInterfaceName() { 84 return null; 85 } 86 87 public NormalizedMessage getMessage(String name) { 88 if ("OUT".equals(name)) { 89 return out; 90 } 91 return null; 92 } 93 94 public QName getOperation() { 95 return null; 96 } 97 98 public URI getPattern() { 99 return null; 100 } 101 102 public Object getProperty(String name) { 103 return null; 104 } 105 106 public Set getPropertyNames() { 107 return null; 108 } 109 110 public Role getRole() { 111 return null; 112 } 113 114 public QName getService() { 115 return null; 116 } 117 118 public ExchangeStatus getStatus() { 119 return ExchangeStatus.DONE; 120 } 121 122 public boolean isTransacted() { 123 return false; 124 } 125 126 public void setEndpoint(ServiceEndpoint endpoint) { 127 } 128 129 public void setError(Exception error) { 130 } 131 132 public void setFault(Fault fault) throws MessagingException { 133 } 134 135 public void setInterfaceName(QName interfaceName) { 136 } 137 138 public void setMessage(NormalizedMessage msg, String name) 139 throws MessagingException { 140 } 141 142 public void setOperation(QName name) { 143 } 144 145 public void setProperty(String name, Object obj) { 146 } 147 148 public void setService(QName service) { 149 } 150 151 public void setStatus(ExchangeStatus status) throws MessagingException { 152 } 153 154 } 155 | Popular Tags |