You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2011/05/07 15:47:19 UTC
svn commit: r1100534 - in /commons/sandbox/runtime/trunk/src/main:
java/org/apache/commons/runtime/net/ native/shared/
Author: mturk
Date: Sat May 7 13:47:18 2011
New Revision: 1100534
URL: http://svn.apache.org/viewvc?rev=1100534&view=rev
Log:
Use Inet instead IP for class names
Added:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Inet4SocketAddress.java
- copied, changed from r1100530, commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPv4SocketAddress.java
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Inet6SocketAddress.java
- copied, changed from r1100530, commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPv6SocketAddress.java
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/InetSocketAddress.java
- copied, changed from r1100530, commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPSocketAddress.java
Removed:
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPSocketAddress.java
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPv4SocketAddress.java
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPv6SocketAddress.java
Modified:
commons/sandbox/runtime/trunk/src/main/native/shared/netaddr.c
Copied: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Inet4SocketAddress.java (from r1100530, commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPv4SocketAddress.java)
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Inet4SocketAddress.java?p2=commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Inet4SocketAddress.java&p1=commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPv4SocketAddress.java&r1=1100530&r2=1100534&rev=1100534&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPv4SocketAddress.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Inet4SocketAddress.java Sat May 7 13:47:18 2011
@@ -29,15 +29,15 @@ import org.apache.commons.runtime.Status
* <p>
* </p>
*/
-public final class IPv4SocketAddress extends IPSocketAddress
+public final class Inet4SocketAddress extends InetSocketAddress
{
- private IPv4SocketAddress()
+ private Inet4SocketAddress()
{
// No instance
}
- public IPv4SocketAddress(String hostname, int port)
+ public Inet4SocketAddress(String hostname, int port)
throws OutOfMemoryError, NetworkException
{
if (hostname == null || hostname.length() == 0)
@@ -46,7 +46,7 @@ public final class IPv4SocketAddress ext
SocketAddressImpl.sockaddr(this, sa);
}
- public IPv4SocketAddress(String hostname)
+ public Inet4SocketAddress(String hostname)
throws OutOfMemoryError, NetworkException
{
this(hostname, 0);
Copied: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Inet6SocketAddress.java (from r1100530, commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPv6SocketAddress.java)
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Inet6SocketAddress.java?p2=commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Inet6SocketAddress.java&p1=commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPv6SocketAddress.java&r1=1100530&r2=1100534&rev=1100534&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPv6SocketAddress.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/Inet6SocketAddress.java Sat May 7 13:47:18 2011
@@ -29,15 +29,15 @@ import org.apache.commons.runtime.Status
* <p>
* </p>
*/
-public final class IPv6SocketAddress extends IPSocketAddress
+public final class Inet6SocketAddress extends InetSocketAddress
{
- private IPv6SocketAddress()
+ private Inet6SocketAddress()
{
// No instance
}
- public IPv6SocketAddress(String hostname, int port)
+ public Inet6SocketAddress(String hostname, int port)
throws OutOfMemoryError, NetworkException
{
if (hostname == null || hostname.length() == 0)
@@ -46,7 +46,7 @@ public final class IPv6SocketAddress ext
SocketAddressImpl.sockaddr(this, sa);
}
- public IPv6SocketAddress(String hostname)
+ public Inet6SocketAddress(String hostname)
throws OutOfMemoryError, NetworkException
{
this(hostname, 0);
Copied: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/InetSocketAddress.java (from r1100530, commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPSocketAddress.java)
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/InetSocketAddress.java?p2=commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/InetSocketAddress.java&p1=commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPSocketAddress.java&r1=1100530&r2=1100534&rev=1100534&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/IPSocketAddress.java (original)
+++ commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/net/InetSocketAddress.java Sat May 7 13:47:18 2011
@@ -30,7 +30,7 @@ import org.apache.commons.runtime.System
* <p>
* </p>
*/
-public class IPSocketAddress extends SocketAddress
+public class InetSocketAddress extends SocketAddress
{
private static native int size0();
@@ -42,18 +42,24 @@ public class IPSocketAddress extends Soc
sasize = size0();
}
- protected IPSocketAddress()
+ protected InetSocketAddress()
{
// No instance
}
- public IPSocketAddress(String hostname, int port)
+ public InetSocketAddress(String hostname, int port)
throws OutOfMemoryError, NetworkException
{
byte[] sa = SocketAddressImpl.getnameinfo(AddressFamily.UNSPEC, hostname, null, port);
SocketAddressImpl.sockaddr(this, sa);
}
+ public InetSocketAddress(String hostname)
+ throws OutOfMemoryError, NetworkException
+ {
+ this(hostname, 0);
+ }
+
public static final SocketAddress[] getAll(String hostname, int port)
throws OutOfMemoryError, NetworkException
{
Modified: commons/sandbox/runtime/trunk/src/main/native/shared/netaddr.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/netaddr.c?rev=1100534&r1=1100533&r2=1100534&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/netaddr.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/netaddr.c Sat May 7 13:47:18 2011
@@ -867,7 +867,7 @@ ACR_NET_EXPORT(jbyteArray, LocalEndpoint
return ba;
}
-ACR_NET_EXPORT(jint, IPSocketAddress, size0)(JNI_STDARGS)
+ACR_NET_EXPORT(jint, InetSocketAddress, size0)(JNI_STDARGS)
{
return ISIZEOF(acr_sockaddr_t);
}