-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7dc965
commit c113aa1
Showing
18 changed files
with
886 additions
and
8 deletions.
There are no files selected for viewing
95 changes: 95 additions & 0 deletions
95
...n-nio/src/main/java/org/irods/jargon2/core/pub/io/plugin/nio/utils/MockSocketChannel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
package org.irods.jargon2.core.pub.io.plugin.nio.utils; | ||
|
||
import java.io.IOException; | ||
import java.net.InetSocketAddress; | ||
import java.net.SocketAddress; | ||
import java.net.SocketOption; | ||
import java.nio.ByteBuffer; | ||
import java.nio.channels.NetworkChannel; | ||
import java.util.Set; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
/** | ||
* Stub out socket channel, very likely to change | ||
* | ||
* @author mcc | ||
* | ||
*/ | ||
public class MockSocketChannel implements java.io.Closeable, java.lang.AutoCloseable, java.nio.channels.ByteChannel, | ||
java.nio.channels.Channel, java.nio.channels.GatheringByteChannel, java.nio.channels.InterruptibleChannel, | ||
java.nio.channels.NetworkChannel, java.nio.channels.ReadableByteChannel, | ||
java.nio.channels.ScatteringByteChannel, java.nio.channels.WritableByteChannel { | ||
|
||
public static final Logger log = LoggerFactory.getLogger(MockSocketChannel.class); | ||
|
||
public MockSocketChannel() { | ||
} | ||
|
||
@Override | ||
public int write(ByteBuffer arg0) throws IOException { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public long read(ByteBuffer[] arg0) throws IOException { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public long read(ByteBuffer[] arg0, int arg1, int arg2) throws IOException { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public int read(ByteBuffer arg0) throws IOException { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public NetworkChannel bind(SocketAddress arg0) throws IOException { | ||
return new MockSocketChannel(); | ||
} | ||
|
||
@Override | ||
public SocketAddress getLocalAddress() throws IOException { | ||
return new InetSocketAddress(1247); | ||
} | ||
|
||
@Override | ||
public <T> T getOption(SocketOption<T> arg0) throws IOException { | ||
return null; | ||
} | ||
|
||
@Override | ||
public <T> NetworkChannel setOption(SocketOption<T> arg0, T arg1) throws IOException { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Set<SocketOption<?>> supportedOptions() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public long write(ByteBuffer[] arg0) throws IOException { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public long write(ByteBuffer[] arg0, int arg1, int arg2) throws IOException { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public boolean isOpen() { | ||
return true; | ||
} | ||
|
||
@Override | ||
public void close() throws IOException { | ||
|
||
} | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
io-plugin-nio/src/main/java/org/irods/jargon2/core/pub/io/plugin/nio/utils/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
/** | ||
* Testing and other utils | ||
* | ||
* @author mcc | ||
* | ||
*/ | ||
package org.irods.jargon2.core.pub.io.plugin.nio.utils; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Set root logger level and appender | ||
log4j.rootLogger=DEBUG, A1 | ||
|
||
# A1 is set to be a ConsoleAppender. | ||
log4j.appender.A1=org.apache.log4j.ConsoleAppender | ||
|
||
# A1 uses PatternLayout. | ||
log4j.appender.A1.layout=org.apache.log4j.PatternLayout | ||
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n |
20 changes: 20 additions & 0 deletions
20
jargon2-core-common/src/main/java/org/irods/jargon2/common/auth/IrodsPrincipal.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* | ||
*/ | ||
package org.irods.jargon2.common.auth; | ||
|
||
/** | ||
* Identity of an iRODS user | ||
* | ||
* @author mcc | ||
* | ||
*/ | ||
public class IrodsPrincipal { | ||
|
||
/** | ||
* | ||
*/ | ||
public IrodsPrincipal() { | ||
} | ||
|
||
} |
8 changes: 8 additions & 0 deletions
8
jargon2-core-common/src/main/java/org/irods/jargon2/common/auth/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
/** | ||
* Auth and identity support | ||
* | ||
* @author mcc | ||
* | ||
*/ | ||
package org.irods.jargon2.common.auth; |
8 changes: 0 additions & 8 deletions
8
jargon2-core-common/src/main/java/org/irods/jargon2/context/monitors/package-info.java
This file was deleted.
Oops, something went wrong.
54 changes: 54 additions & 0 deletions
54
...n/src/main/java/org/irods/jargon2/exception/configuration/TestConfigurationException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* | ||
*/ | ||
package org.irods.jargon2.exception.configuration; | ||
|
||
import org.irods.jargon2.exception.JargonException; | ||
|
||
/** | ||
* General exception caused by using Test utilities | ||
* | ||
* @author Mike Conway, DICE (10/16/2009) | ||
* @since 10/16/2009 | ||
* | ||
*/ | ||
public class TestConfigurationException extends JargonException { | ||
|
||
/** | ||
* | ||
*/ | ||
private static final long serialVersionUID = 2124699560973645080L; | ||
|
||
/** | ||
* | ||
*/ | ||
public TestConfigurationException() { | ||
super(); | ||
} | ||
|
||
/** | ||
* @param arg0 | ||
*/ | ||
public TestConfigurationException(final String arg0) { | ||
super(arg0); | ||
|
||
} | ||
|
||
/** | ||
* @param arg0 | ||
*/ | ||
public TestConfigurationException(final Throwable arg0) { | ||
super(arg0); | ||
|
||
} | ||
|
||
/** | ||
* @param arg0 | ||
* @param arg1 | ||
*/ | ||
public TestConfigurationException(final String arg0, final Throwable arg1) { | ||
super(arg0, arg1); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<parent> | ||
<groupId>org.irods</groupId> | ||
<artifactId>jargon2</artifactId> | ||
<version>4.3.0.0-SNAPSHOT</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
<artifactId>test-support</artifactId> | ||
<packaging>jar</packaging> | ||
<description>Utility support for unit tests</description> | ||
<name>test-support</name> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.irods</groupId> | ||
<artifactId>jargon2-core-common</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
</dependencies> | ||
</project> | ||
|
Empty file.
Oops, something went wrong.