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    
018    package org.apache.camel.component.syslog;
019    
020    import java.util.Date;
021    
022    public class SyslogMessage {
023    
024        private SyslogFacility facility;
025        private SyslogSeverity severity;
026        private String remoteAddress;
027        private String localAddress;
028        private String hostname;
029        private String logMessage;
030    
031        private Date timestamp;
032    
033        public String getLogMessage() {
034            return logMessage;
035        }
036    
037        public void setLogMessage(String logMessage) {
038            this.logMessage = logMessage;
039        }
040    
041        public String getLocalAddress() {
042            return localAddress;
043        }
044    
045        public void setLocalAddress(String localAddress) {
046            this.localAddress = localAddress;
047        }
048    
049        public SyslogFacility getFacility() {
050            return facility;
051        }
052    
053        public void setFacility(SyslogFacility facility) {
054            this.facility = facility;
055        }
056    
057        public Date getTimestamp() {
058            return timestamp;
059        }
060    
061        public void setTimestamp(Date timestamp) {
062            this.timestamp = timestamp;
063        }
064    
065        public SyslogSeverity getSeverity() {
066            return severity;
067        }
068    
069        public void setSeverity(SyslogSeverity severity) {
070            this.severity = severity;
071        }
072    
073        public String getRemoteAddress() {
074            return remoteAddress;
075        }
076    
077        public void setRemoteAddress(String remoteAddress) {
078            this.remoteAddress = remoteAddress;
079        }
080    
081        public String getHostname() {
082            return hostname;
083        }
084    
085        public void setHostname(String hostname) {
086            this.hostname = hostname;
087        }
088    
089        @Override
090        public String toString() {
091            return "SyslogMessage{" + "content='" + logMessage + '\'' + ", facility=" + facility + ", severity=" + severity + ", remoteAddress='"
092                   + remoteAddress + '\'' + ", localAddress='" + localAddress + '\'' + ", hostname='" + hostname + '\'' + ", messageTime=" + timestamp + '}';
093        }
094    }