001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 package org.apache.camel.processor.interceptor; 018 019 import java.util.Date; 020 021 /** 022 * A trace event message that contains decomposited information about the traced 023 * {@link org.apache.camel.Exchange} at the point of interception. The information is stored as snapshot copies 024 * using String types. 025 */ 026 public interface TraceEventMessage { 027 028 /** 029 * Gets the timestamp when the interception occured 030 */ 031 Date getTimestamp(); 032 033 /** 034 * Uri of the endpoint that started the {@link org.apache.camel.Exchange} currently being traced. 035 */ 036 String getFromEndpointUri(); 037 038 /** 039 * Gets the previous node. 040 * <p/> 041 * Will return <tt>null</tt> if this is the first node, then you can use the from endpoint uri 042 * instread to indicate the start 043 */ 044 String getPreviousNode(); 045 046 /** 047 * Gets the current node that just have been intercepted and processed 048 * <p/> 049 * Is never null. 050 */ 051 String getToNode(); 052 053 String getExchangeId(); 054 055 /** 056 * Gets the exchange id without the leading hostname 057 */ 058 String getShortExchangeId(); 059 060 String getExchangePattern(); 061 062 String getProperties(); 063 064 String getHeaders(); 065 066 String getBody(); 067 068 String getBodyType(); 069 070 String getOutBody(); 071 072 String getOutBodyType(); 073 074 /** 075 * Gets the caused by exception (ie {@link org.apache.camel.Exchange#getException() Exchange#getException()}. 076 */ 077 String getCausedByException(); 078 }