2003-12-02 Michael Koch <konqueror@gmx.de>

* gnu/java/nio/DatagramChannelImpl.java
	(blocking): Initialize with true by default.
	* gnu/java/nio/ServerSocketChannelImpl.java
	(serverSocket): Made private.
	(blocking): Likewise.
	(connected): Likewise.
	* gnu/java/nio/SocketChannelImpl.java
	(connectionPending): Made private.
	* gnu/java/nio/FileLockImpl.java
	(static): Load native library (needed for classpath).
	* gnu/java/nio/SelectorImpl.java
	(static): Load native library (needed for classpath).

From-SVN: r74181
This commit is contained in:
Michael Koch 2003-12-02 15:03:21 +00:00 committed by Michael Koch
parent a74e3b7707
commit 598e749df6
6 changed files with 40 additions and 5 deletions

View File

@ -1,3 +1,18 @@
2003-12-02 Michael Koch <konqueror@gmx.de>
* gnu/java/nio/DatagramChannelImpl.java
(blocking): Initialize with true by default.
* gnu/java/nio/ServerSocketChannelImpl.java
(serverSocket): Made private.
(blocking): Likewise.
(connected): Likewise.
* gnu/java/nio/SocketChannelImpl.java
(connectionPending): Made private.
* gnu/java/nio/FileLockImpl.java
(static): Load native library (needed for classpath).
* gnu/java/nio/SelectorImpl.java
(static): Load native library (needed for classpath).
2003-12-02 Michael Koch <konqueror@gmx.de>
* gnu/java/net/protocol/file/Connection.java

View File

@ -56,7 +56,7 @@ import java.nio.channels.spi.SelectorProvider;
public final class DatagramChannelImpl extends DatagramChannel
{
private NIODatagramSocket socket;
private boolean blocking = false;
private boolean blocking = true;
protected DatagramChannelImpl (SelectorProvider provider)
throws IOException

View File

@ -42,6 +42,7 @@ import java.io.FileDescriptor;
import java.io.IOException;
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
import gnu.classpath.Configuration;
/**
* @author Michael Koch
@ -49,6 +50,15 @@ import java.nio.channels.FileLock;
*/
public class FileLockImpl extends FileLock
{
static
{
// load the shared library needed for native methods.
if (Configuration.INIT_LOAD_LIBRARY)
{
System.loadLibrary ("javanio");
}
}
private FileDescriptor fd;
private boolean released;

View File

@ -49,9 +49,19 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import gnu.classpath.Configuration;
public class SelectorImpl extends AbstractSelector
{
static
{
// load the shared library needed for native methods.
if (Configuration.INIT_LOAD_LIBRARY)
{
System.loadLibrary ("javanio");
}
}
private Set keys;
private Set selected;

View File

@ -54,9 +54,9 @@ import java.nio.channels.spi.SelectorProvider;
public final class ServerSocketChannelImpl extends ServerSocketChannel
{
NIOServerSocket serverSocket;
boolean blocking = true;
boolean connected = false;
private NIOServerSocket serverSocket;
private boolean blocking = true;
private boolean connected;
protected ServerSocketChannelImpl (SelectorProvider provider)
throws IOException

View File

@ -66,7 +66,7 @@ public final class SocketChannelImpl extends SocketChannel
private PlainSocketImpl impl;
private NIOSocket socket;
private boolean blocking = true;
private boolean connectionPending = false;
private boolean connectionPending;
SocketChannelImpl (SelectorProvider provider)
throws IOException