浏览代码

Added Copyright notice.

didfet 10 年之前
父节点
当前提交
a3129da779

+ 17 - 0
src/main/java/info/fetter/logstashforwarder/Event.java

@@ -1,5 +1,22 @@
 package info.fetter.logstashforwarder;
 
+/*
+ * Copyright 2015 Didier Fetter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
 import java.util.HashMap;
 import java.util.Map;
 

+ 21 - 15
src/main/java/info/fetter/logstashforwarder/config/Configuration.java

@@ -1,5 +1,22 @@
 package info.fetter.logstashforwarder.config;
 
+/*
+ * Copyright 2015 Didier Fetter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
 import java.util.List;
 
 import org.apache.commons.lang.builder.ToStringBuilder;
@@ -7,34 +24,23 @@ import org.apache.commons.lang.builder.ToStringBuilder;
 public class Configuration {
 	private NetworkSection network;
 	private List<FilesSection> files;
-	/**
-	 * @return the network
-	 */
+
 	public NetworkSection getNetwork() {
 		return network;
 	}
-	/**
-	 * @param network the network to set
-	 */
+
 	public void setNetwork(NetworkSection network) {
 		this.network = network;
 	}
-	/**
-	 * @return the files
-	 */
+
 	public List<FilesSection> getFiles() {
 		return files;
 	}
-	/**
-	 * @param files the files to set
-	 */
+
 	public void setFiles(List<FilesSection> files) {
 		this.files = files;
 	}
 	
-	/* (non-Javadoc)
-	 * @see java.lang.Object#toString()
-	 */
 	@Override
 	public String toString() {
 	     return new ToStringBuilder(this).

+ 17 - 0
src/main/java/info/fetter/logstashforwarder/config/ConfigurationManager.java

@@ -1,5 +1,22 @@
 package info.fetter.logstashforwarder.config;
 
+/*
+ * Copyright 2015 Didier Fetter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
 import java.io.File;
 import java.io.IOException;
 

+ 21 - 15
src/main/java/info/fetter/logstashforwarder/config/FilesSection.java

@@ -1,5 +1,22 @@
 package info.fetter.logstashforwarder.config;
 
+/*
+ * Copyright 2015 Didier Fetter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
 import java.util.List;
 import java.util.Map;
 
@@ -8,34 +25,23 @@ import org.apache.commons.lang.builder.ToStringBuilder;
 public class FilesSection {
 	private List<String> paths;
 	private Map<String,String> fields;
-	/**
-	 * @return the paths
-	 */
+
 	public List<String> getPaths() {
 		return paths;
 	}
-	/**
-	 * @param paths the paths to set
-	 */
+
 	public void setPaths(List<String> paths) {
 		this.paths = paths;
 	}
-	/**
-	 * @return the fields
-	 */
+
 	public Map<String, String> getFields() {
 		return fields;
 	}
-	/**
-	 * @param fields the fields to set
-	 */
+
 	public void setFields(Map<String, String> fields) {
 		this.fields = fields;
 	}
 	
-	/* (non-Javadoc)
-	 * @see java.lang.Object#toString()
-	 */
 	@Override
 	public String toString() {
 	     return new ToStringBuilder(this).

+ 27 - 33
src/main/java/info/fetter/logstashforwarder/config/NetworkSection.java

@@ -1,5 +1,22 @@
 package info.fetter.logstashforwarder.config;
 
+/*
+ * Copyright 2015 Didier Fetter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
 import java.util.List;
 
 import org.apache.commons.lang.builder.ToStringBuilder;
@@ -15,70 +32,47 @@ public class NetworkSection {
 	@JsonProperty("ssl key")
 	private String sslKey;
 	private int timeout;
-	/**
-	 * @return the servers
-	 */
+
 	public List<String> getServers() {
 		return servers;
 	}
-	/**
-	 * @param servers the servers to set
-	 */
+
 	public void setServers(List<String> servers) {
 		this.servers = servers;
 	}
-	/**
-	 * @return the sslCertificate
-	 */
+
 	public String getSslCertificate() {
 		return sslCertificate;
 	}
-	/**
-	 * @param sslCertificate the sslCertificate to set
-	 */
+
 	public void setSslCertificate(String sslCertificate) {
 		this.sslCertificate = sslCertificate;
 	}
-	/**
-	 * @return the sslCA
-	 */
+
 	public String getSslCA() {
 		return sslCA;
 	}
-	/**
-	 * @param sslCA the sslCA to set
-	 */
+
 	public void setSslCA(String sslCA) {
 		this.sslCA = sslCA;
 	}
-	/**
-	 * @return the timeout
-	 */
+
 	public int getTimeout() {
 		return timeout;
 	}
-	/**
-	 * @param timeout the timeout to set
-	 */
+
 	public void setTimeout(int timeout) {
 		this.timeout = timeout;
 	}
 	
-	/**
-	 * @return the sslKey
-	 */
 	public String getSslKey() {
 		return sslKey;
 	}
-	/**
-	 * @param sslKey the sslKey to set
-	 */
+
 	public void setSslKey(String sslKey) {
 		this.sslKey = sslKey;
 	}
-	/* (non-Javadoc)
-	 * @see java.lang.Object#toString()
-	 */
+
 	@Override
 	public String toString() {
 	     return new ToStringBuilder(this).

+ 17 - 0
src/main/java/info/fetter/logstashforwarder/protocol/LumberjackClient.java

@@ -1,5 +1,22 @@
 package info.fetter.logstashforwarder.protocol;
 
+/*
+ * Copyright 2015 Didier Fetter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
 import info.fetter.logstashforwarder.Event;
 
 import java.io.BufferedOutputStream;

+ 17 - 0
src/test/java/info/fetter/logstashforwarder/config/ConfigurationManagerTest.java

@@ -1,5 +1,22 @@
 package info.fetter.logstashforwarder.config;
 
+/*
+ * Copyright 2015 Didier Fetter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
 import static org.apache.log4j.Level.DEBUG;
 
 import java.io.File;