1 10 11 package org.mule.umo; 12 13 import org.mule.umo.endpoint.UMOEndpoint; 14 import org.mule.umo.endpoint.UMOEndpointURI; 15 import org.mule.umo.transformer.TransformerException; 16 17 import java.io.OutputStream ; 18 19 27 public interface UMOEventContext 28 { 29 34 UMOMessage getMessage(); 35 36 42 byte[] getMessageAsBytes() throws UMOException; 43 44 54 Object getTransformedMessage() throws TransformerException; 55 56 70 Object getTransformedMessage(Class expectedType) throws TransformerException; 71 72 82 byte[] getTransformedMessageAsBytes() throws TransformerException; 83 84 95 String getTransformedMessageAsString() throws TransformerException; 96 97 104 String getMessageAsString() throws UMOException; 105 106 117 String getTransformedMessageAsString(String encoding) throws TransformerException; 118 119 126 String getMessageAsString(String encoding) throws UMOException; 127 128 134 UMOTransaction getCurrentTransaction(); 135 136 141 void markTransactionForRollback() throws TransactionException; 142 143 151 UMOMessage sendEvent(Object message) throws UMOException; 152 153 163 UMOMessage sendEvent(UMOMessage message) throws UMOException; 164 165 176 UMOMessage sendEvent(UMOMessage message, UMOEndpointURI endpoint) throws UMOException; 177 178 191 UMOMessage sendEvent(UMOMessage message, String endpointName) throws UMOException; 192 193 204 UMOMessage sendEvent(UMOMessage message, UMOEndpoint endpoint) throws UMOException; 205 206 222 FutureMessageResult sendEventAsync(Object message, int timeout) throws UMOException; 223 224 240 FutureMessageResult sendEventAsync(UMOMessage message, int timeout) throws UMOException; 241 242 259 FutureMessageResult sendEventAsync(UMOMessage message, UMOEndpointURI endpoint, int timeout) 260 throws UMOException; 261 262 281 FutureMessageResult sendEventAsync(UMOMessage message, String endpointName, int timeout) 282 throws UMOException; 283 284 292 void dispatchEvent(UMOMessage message) throws UMOException; 293 294 302 void dispatchEvent(Object payload) throws UMOException; 303 304 315 void dispatchEvent(UMOMessage message, UMOEndpointURI endpoint) throws UMOException; 316 317 329 void dispatchEvent(UMOMessage message, String endpointName) throws UMOException; 330 331 341 void dispatchEvent(UMOMessage message, UMOEndpoint endpoint) throws UMOException; 342 343 352 UMOMessage receiveEvent(UMOEndpoint endpoint, long timeout) throws UMOException; 353 354 363 UMOMessage receiveEvent(String endpointName, long timeout) throws UMOException; 364 365 373 UMOMessage receiveEvent(UMOEndpointURI endpoint, long timeout) throws UMOException; 374 375 UMODescriptor getComponentDescriptor(); 376 377 385 Object getProperty(String name); 386 387 396 Object getProperty(String name, Object defaultValue); 397 398 407 String getStringProperty(String name); 408 409 419 String getStringProperty(String name, String defaultValue); 420 421 431 int getIntProperty(String name, int defaultValue); 432 433 443 long getLongProperty(String name, long defaultValue); 444 445 455 double getDoubleProperty(String name, double defaultValue); 456 457 467 boolean getBooleanProperty(String name, boolean defaultValue); 468 469 477 void setProperty(String name, Object value); 478 479 488 void setBooleanProperty(String name, boolean value); 489 490 499 void setIntProperty(String name, int value); 500 501 510 void setLongProperty(String name, long value); 511 512 521 void setDoubleProperty(String name, double value); 522 523 538 boolean isStopFurtherProcessing(); 539 540 552 void setStopFurtherProcessing(boolean stopFurtherProcessing); 553 554 561 OutputStream getOutputStream(); 562 563 568 boolean isSynchronous(); 569 570 576 UMOEndpointURI getEndpointURI(); 577 578 585 UMOTransaction getTransaction(); 586 587 592 int getTimeout(); 593 594 599 boolean isStreaming(); 600 601 609 public String getEncoding(); 610 611 UMOSession getSession(); 612 } 613 | Popular Tags |