Skip to content

Commit 82c75d1

Browse files
committed
first shot at using mina ssh client
Signed-off-by: Ludovic Orban <[email protected]>
1 parent 284dccb commit 82c75d1

File tree

8 files changed

+282
-629
lines changed

8 files changed

+282
-629
lines changed

pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,11 +277,6 @@
277277
<artifactId>curator-recipes</artifactId>
278278
<version>5.6.0</version>
279279
</dependency>
280-
<dependency>
281-
<groupId>com.hierynomus</groupId>
282-
<artifactId>sshj</artifactId>
283-
<version>0.38.0</version>
284-
</dependency>
285280

286281
<dependency>
287282
<groupId>org.junit.jupiter</groupId>
@@ -305,7 +300,6 @@
305300
<groupId>org.apache.sshd</groupId>
306301
<artifactId>sshd-sftp</artifactId>
307302
<version>2.12.1</version>
308-
<scope>test</scope>
309303
</dependency>
310304
</dependencies>
311305

src/main/java/org/mortbay/jetty/orchestrator/configuration/SshRemoteHostLauncher.java

Lines changed: 126 additions & 136 deletions
Large diffs are not rendered by default.

src/main/java/org/mortbay/jetty/orchestrator/nodefs/InMemoryFile.java

Lines changed: 0 additions & 45 deletions
This file was deleted.

src/main/java/org/mortbay/jetty/orchestrator/nodefs/NodeFileAttributes.java

Lines changed: 66 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -13,78 +13,71 @@
1313

1414
package org.mortbay.jetty.orchestrator.nodefs;
1515

16-
import java.nio.file.attribute.BasicFileAttributes;
17-
import java.nio.file.attribute.FileTime;
18-
import java.util.concurrent.TimeUnit;
19-
20-
import net.schmizz.sshj.sftp.FileAttributes;
21-
import net.schmizz.sshj.sftp.FileMode;
22-
23-
class NodeFileAttributes implements BasicFileAttributes
16+
class NodeFileAttributes // implements BasicFileAttributes
2417
{
25-
private final FileAttributes lstat;
26-
27-
NodeFileAttributes(FileAttributes lstat)
28-
{
29-
this.lstat = lstat;
30-
}
31-
32-
public FileAttributes getLstat()
33-
{
34-
return lstat;
35-
}
36-
37-
@Override
38-
public FileTime lastModifiedTime()
39-
{
40-
return FileTime.from(lstat.getMtime(), TimeUnit.MILLISECONDS);
41-
}
42-
43-
@Override
44-
public FileTime lastAccessTime()
45-
{
46-
return FileTime.from(lstat.getAtime(), TimeUnit.MILLISECONDS);
47-
}
48-
49-
@Override
50-
public FileTime creationTime()
51-
{
52-
return lastModifiedTime();
53-
}
54-
55-
@Override
56-
public boolean isRegularFile()
57-
{
58-
return lstat.getType() == FileMode.Type.REGULAR;
59-
}
60-
61-
@Override
62-
public boolean isDirectory()
63-
{
64-
return lstat.getType() == FileMode.Type.DIRECTORY;
65-
}
66-
67-
@Override
68-
public boolean isSymbolicLink()
69-
{
70-
return lstat.getType() == FileMode.Type.SYMLINK;
71-
}
72-
73-
@Override
74-
public boolean isOther()
75-
{
76-
return !isDirectory() && !isRegularFile() && !isSymbolicLink();
77-
}
78-
79-
@Override
80-
public long size()
81-
{
82-
return lstat.getSize();
83-
}
84-
85-
@Override
86-
public Object fileKey()
87-
{
88-
return null;
89-
}
18+
// private final FileAttributes lstat;
19+
//
20+
// NodeFileAttributes(FileAttributes lstat)
21+
// {
22+
// this.lstat = lstat;
23+
// }
24+
//
25+
// public FileAttributes getLstat()
26+
// {
27+
// return lstat;
28+
// }
29+
//
30+
// @Override
31+
// public FileTime lastModifiedTime()
32+
// {
33+
// return FileTime.from(lstat.getMtime(), TimeUnit.MILLISECONDS);
34+
// }
35+
//
36+
// @Override
37+
// public FileTime lastAccessTime()
38+
// {
39+
// return FileTime.from(lstat.getAtime(), TimeUnit.MILLISECONDS);
40+
// }
41+
//
42+
// @Override
43+
// public FileTime creationTime()
44+
// {
45+
// return lastModifiedTime();
46+
// }
47+
//
48+
// @Override
49+
// public boolean isRegularFile()
50+
// {
51+
// return lstat.getType() == FileMode.Type.REGULAR;
52+
// }
53+
//
54+
// @Override
55+
// public boolean isDirectory()
56+
// {
57+
// return lstat.getType() == FileMode.Type.DIRECTORY;
58+
// }
59+
//
60+
// @Override
61+
// public boolean isSymbolicLink()
62+
// {
63+
// return lstat.getType() == FileMode.Type.SYMLINK;
64+
// }
65+
//
66+
// @Override
67+
// public boolean isOther()
68+
// {
69+
// return !isDirectory() && !isRegularFile() && !isSymbolicLink();
70+
// }
71+
//
72+
// @Override
73+
// public long size()
74+
// {
75+
// return lstat.getSize();
76+
// }
77+
//
78+
// @Override
79+
// public Object fileKey()
80+
// {
81+
// return null;
82+
// }
9083
}

0 commit comments

Comments
 (0)