From 7ae84be54801cb5cca473166aadb338e14f4fbc0 Mon Sep 17 00:00:00 2001 From: hierynomus Date: Mon, 19 Jan 2015 11:54:55 +0100 Subject: [PATCH] Fixed build by adding license headers to new files --- .../java/net/schmizz/keepalive/KeepAlive.java | 17 +++++++++++++-- .../schmizz/keepalive/KeepAliveProvider.java | 15 +++++++++++++ .../schmizz/keepalive/KeepAliveRunner.java | 17 +++++++++++++-- .../java/net/schmizz/sshj/SshKeepAlive.java | 21 ------------------- 4 files changed, 45 insertions(+), 25 deletions(-) delete mode 100644 src/test/java/net/schmizz/sshj/SshKeepAlive.java diff --git a/src/main/java/net/schmizz/keepalive/KeepAlive.java b/src/main/java/net/schmizz/keepalive/KeepAlive.java index 214ac925..c60a629c 100644 --- a/src/main/java/net/schmizz/keepalive/KeepAlive.java +++ b/src/main/java/net/schmizz/keepalive/KeepAlive.java @@ -1,7 +1,20 @@ +/** + * Copyright 2009 sshj contributors + * + * 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. + */ package net.schmizz.keepalive; -import net.schmizz.sshj.common.Message; -import net.schmizz.sshj.common.SSHPacket; import net.schmizz.sshj.connection.ConnectionException; import net.schmizz.sshj.connection.ConnectionImpl; import net.schmizz.sshj.transport.TransportException; diff --git a/src/main/java/net/schmizz/keepalive/KeepAliveProvider.java b/src/main/java/net/schmizz/keepalive/KeepAliveProvider.java index 59b7a0b6..36c326a0 100644 --- a/src/main/java/net/schmizz/keepalive/KeepAliveProvider.java +++ b/src/main/java/net/schmizz/keepalive/KeepAliveProvider.java @@ -1,3 +1,18 @@ +/** + * Copyright 2009 sshj contributors + * + * 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. + */ package net.schmizz.keepalive; import net.schmizz.sshj.connection.ConnectionImpl; diff --git a/src/main/java/net/schmizz/keepalive/KeepAliveRunner.java b/src/main/java/net/schmizz/keepalive/KeepAliveRunner.java index 632db6a2..5b82f634 100644 --- a/src/main/java/net/schmizz/keepalive/KeepAliveRunner.java +++ b/src/main/java/net/schmizz/keepalive/KeepAliveRunner.java @@ -1,3 +1,18 @@ +/** + * Copyright 2009 sshj contributors + * + * 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. + */ package net.schmizz.keepalive; import net.schmizz.concurrent.Promise; @@ -5,8 +20,6 @@ import net.schmizz.sshj.common.SSHPacket; import net.schmizz.sshj.connection.ConnectionException; import net.schmizz.sshj.connection.ConnectionImpl; import net.schmizz.sshj.transport.TransportException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import java.util.LinkedList; import java.util.Queue; diff --git a/src/test/java/net/schmizz/sshj/SshKeepAlive.java b/src/test/java/net/schmizz/sshj/SshKeepAlive.java deleted file mode 100644 index dd829858..00000000 --- a/src/test/java/net/schmizz/sshj/SshKeepAlive.java +++ /dev/null @@ -1,21 +0,0 @@ -package net.schmizz.sshj; - -import net.schmizz.keepalive.KeepAliveProvider; -import net.schmizz.sshj.transport.verification.PromiscuousVerifier; - -import java.io.IOException; -import java.util.concurrent.CountDownLatch; - -public class SshKeepAlive { - - public static void main(String[] args) throws IOException, InterruptedException { - Config config = new DefaultConfig(); - config.setKeepAliveProvider(KeepAliveProvider.KEEP_ALIVE); - SSHClient client = new SSHClient(config); - client.conn.getKeepAlive().setKeepAliveInterval(5); - client.addHostKeyVerifier(new PromiscuousVerifier()); - client.connect("172.16.37.129", 22); - client.authPassword("jeroen", "jeroen"); - new CountDownLatch(1).await(); - } -}