Added Copyright notice.

This commit is contained in:
didfet
2015-03-09 23:07:21 +01:00
parent b54e3d9f25
commit a3129da779
7 changed files with 137 additions and 63 deletions

View File

@@ -1,5 +1,22 @@
package info.fetter.logstashforwarder; 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.HashMap;
import java.util.Map; import java.util.Map;

View File

@@ -1,5 +1,22 @@
package info.fetter.logstashforwarder.config; 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.List;
import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringBuilder;
@@ -7,34 +24,23 @@ import org.apache.commons.lang.builder.ToStringBuilder;
public class Configuration { public class Configuration {
private NetworkSection network; private NetworkSection network;
private List<FilesSection> files; private List<FilesSection> files;
/**
* @return the network
*/
public NetworkSection getNetwork() { public NetworkSection getNetwork() {
return network; return network;
} }
/**
* @param network the network to set
*/
public void setNetwork(NetworkSection network) { public void setNetwork(NetworkSection network) {
this.network = network; this.network = network;
} }
/**
* @return the files
*/
public List<FilesSection> getFiles() { public List<FilesSection> getFiles() {
return files; return files;
} }
/**
* @param files the files to set
*/
public void setFiles(List<FilesSection> files) { public void setFiles(List<FilesSection> files) {
this.files = files; this.files = files;
} }
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this). return new ToStringBuilder(this).

View File

@@ -1,5 +1,22 @@
package info.fetter.logstashforwarder.config; 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.File;
import java.io.IOException; import java.io.IOException;

View File

@@ -1,5 +1,22 @@
package info.fetter.logstashforwarder.config; 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.List;
import java.util.Map; import java.util.Map;
@@ -8,34 +25,23 @@ import org.apache.commons.lang.builder.ToStringBuilder;
public class FilesSection { public class FilesSection {
private List<String> paths; private List<String> paths;
private Map<String,String> fields; private Map<String,String> fields;
/**
* @return the paths
*/
public List<String> getPaths() { public List<String> getPaths() {
return paths; return paths;
} }
/**
* @param paths the paths to set
*/
public void setPaths(List<String> paths) { public void setPaths(List<String> paths) {
this.paths = paths; this.paths = paths;
} }
/**
* @return the fields
*/
public Map<String, String> getFields() { public Map<String, String> getFields() {
return fields; return fields;
} }
/**
* @param fields the fields to set
*/
public void setFields(Map<String, String> fields) { public void setFields(Map<String, String> fields) {
this.fields = fields; this.fields = fields;
} }
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this). return new ToStringBuilder(this).

View File

@@ -1,5 +1,22 @@
package info.fetter.logstashforwarder.config; 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.List;
import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringBuilder;
@@ -15,70 +32,47 @@ public class NetworkSection {
@JsonProperty("ssl key") @JsonProperty("ssl key")
private String sslKey; private String sslKey;
private int timeout; private int timeout;
/**
* @return the servers
*/
public List<String> getServers() { public List<String> getServers() {
return servers; return servers;
} }
/**
* @param servers the servers to set
*/
public void setServers(List<String> servers) { public void setServers(List<String> servers) {
this.servers = servers; this.servers = servers;
} }
/**
* @return the sslCertificate
*/
public String getSslCertificate() { public String getSslCertificate() {
return sslCertificate; return sslCertificate;
} }
/**
* @param sslCertificate the sslCertificate to set
*/
public void setSslCertificate(String sslCertificate) { public void setSslCertificate(String sslCertificate) {
this.sslCertificate = sslCertificate; this.sslCertificate = sslCertificate;
} }
/**
* @return the sslCA
*/
public String getSslCA() { public String getSslCA() {
return sslCA; return sslCA;
} }
/**
* @param sslCA the sslCA to set
*/
public void setSslCA(String sslCA) { public void setSslCA(String sslCA) {
this.sslCA = sslCA; this.sslCA = sslCA;
} }
/**
* @return the timeout
*/
public int getTimeout() { public int getTimeout() {
return timeout; return timeout;
} }
/**
* @param timeout the timeout to set
*/
public void setTimeout(int timeout) { public void setTimeout(int timeout) {
this.timeout = timeout; this.timeout = timeout;
} }
/**
* @return the sslKey
*/
public String getSslKey() { public String getSslKey() {
return sslKey; return sslKey;
} }
/**
* @param sslKey the sslKey to set
*/
public void setSslKey(String sslKey) { public void setSslKey(String sslKey) {
this.sslKey = sslKey; this.sslKey = sslKey;
} }
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this). return new ToStringBuilder(this).

View File

@@ -1,5 +1,22 @@
package info.fetter.logstashforwarder.protocol; 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 info.fetter.logstashforwarder.Event;
import java.io.BufferedOutputStream; import java.io.BufferedOutputStream;

View File

@@ -1,5 +1,22 @@
package info.fetter.logstashforwarder.config; 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 static org.apache.log4j.Level.DEBUG;
import java.io.File; import java.io.File;