gnu.java.net.local

Class LocalSocket


public final class LocalSocket
extends Socket

A local, or unix-domain socket. Unix domain sockets are connected on the local filesystem itself, rather than a remote address.

Constructor Summary

LocalSocket()
LocalSocket(LocalSocketAddress addr)

Method Summary

void
bind(SocketAddress bindpoint)
void
close()
void
connect(SocketAddress endpoint, int timeout)
SocketChannel
getChannel()
InetAddress
getInetAddress()
InputStream
getInputStream()
boolean
getKeepAlive()
InetAddress
getLocalAddress()
int
getLocalPort()
SocketAddress
getLocalSocketAddress()
boolean
getOOBInline()
OutputStream
getOutputStream()
int
getPort()
int
getReceiveBufferSize()
SocketAddress
getRemoteSocketAddress()
boolean
getReuseAddress()
int
getSendBufferSize()
int
getSoLinger()
int
getSoTimeout()
boolean
getTcpNoDelay()
int
getTrafficClass()
boolean
isBound()
boolean
isClosed()
boolean
isConnected()
void
sendUrgentData(int b)
void
setKeepAlive(boolean b)
void
setOOBInline(boolean b)
void
setReceiveBufferSize(int i)
void
setReuseAddress(boolean b)
void
setSendBufferSize(int i)
void
setSoLinger(boolean b, int i)
void
setSoTimeout(int i)
void
setTcpNoDelay(boolean b)
void
setTrafficClass(int i)
void
shutdownInput()
void
shutdownOutput()

Methods inherited from class java.net.Socket

bind, close, connect, connect, getChannel, getInetAddress, getInputStream, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOutputStream, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSoLinger, setSoTimeout, setSocketImplFactory, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput, toString

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

LocalSocket

public LocalSocket()
            throws SocketException

LocalSocket

public LocalSocket(LocalSocketAddress addr)
            throws SocketException

Method Details

bind

public void bind(SocketAddress bindpoint)
            throws IOException
Overrides:
bind in interface Socket

close

public void close()
            throws IOException
Overrides:
close in interface Socket

connect

public void connect(SocketAddress endpoint,
                    int timeout)
            throws IOException
Overrides:
connect in interface Socket

getChannel

public SocketChannel getChannel()
Overrides:
getChannel in interface Socket

getInetAddress

public InetAddress getInetAddress()
Overrides:
getInetAddress in interface Socket

getInputStream

public InputStream getInputStream()
            throws IOException
Overrides:
getInputStream in interface Socket

getKeepAlive

public boolean getKeepAlive()
            throws SocketException
Overrides:
getKeepAlive in interface Socket

getLocalAddress

public InetAddress getLocalAddress()
Overrides:
getLocalAddress in interface Socket

getLocalPort

public int getLocalPort()
Overrides:
getLocalPort in interface Socket

getLocalSocketAddress

public SocketAddress getLocalSocketAddress()
Overrides:
getLocalSocketAddress in interface Socket

getOOBInline

public boolean getOOBInline()
            throws SocketException
Overrides:
getOOBInline in interface Socket

getOutputStream

public OutputStream getOutputStream()
            throws IOException
Overrides:
getOutputStream in interface Socket

getPort

public int getPort()
Overrides:
getPort in interface Socket

getReceiveBufferSize

public int getReceiveBufferSize()
            throws SocketException
Overrides:
getReceiveBufferSize in interface Socket

getRemoteSocketAddress

public SocketAddress getRemoteSocketAddress()
Overrides:
getRemoteSocketAddress in interface Socket

getReuseAddress

public boolean getReuseAddress()
            throws SocketException
Overrides:
getReuseAddress in interface Socket

getSendBufferSize

public int getSendBufferSize()
            throws SocketException
Overrides:
getSendBufferSize in interface Socket

getSoLinger

public int getSoLinger()
            throws SocketException
Overrides:
getSoLinger in interface Socket

getSoTimeout

public int getSoTimeout()
            throws SocketException
Overrides:
getSoTimeout in interface Socket

getTcpNoDelay

public boolean getTcpNoDelay()
            throws SocketException
Overrides:
getTcpNoDelay in interface Socket

getTrafficClass

public int getTrafficClass()
            throws SocketException
Overrides:
getTrafficClass in interface Socket

isBound

public boolean isBound()
Overrides:
isBound in interface Socket

isClosed

public boolean isClosed()
Overrides:
isClosed in interface Socket

isConnected

public boolean isConnected()
Overrides:
isConnected in interface Socket

sendUrgentData

public void sendUrgentData(int b)
            throws IOException
Overrides:
sendUrgentData in interface Socket

setKeepAlive

public void setKeepAlive(boolean b)
            throws SocketException
Overrides:
setKeepAlive in interface Socket

setOOBInline

public void setOOBInline(boolean b)
            throws SocketException
Overrides:
setOOBInline in interface Socket

setReceiveBufferSize

public void setReceiveBufferSize(int i)
            throws SocketException
Overrides:
setReceiveBufferSize in interface Socket

setReuseAddress

public void setReuseAddress(boolean b)
            throws SocketException
Overrides:
setReuseAddress in interface Socket

setSendBufferSize

public void setSendBufferSize(int i)
            throws SocketException
Overrides:
setSendBufferSize in interface Socket

setSoLinger

public void setSoLinger(boolean b,
                        int i)
            throws SocketException
Overrides:
setSoLinger in interface Socket

setSoTimeout

public void setSoTimeout(int i)
            throws SocketException
Overrides:
setSoTimeout in interface Socket

setTcpNoDelay

public void setTcpNoDelay(boolean b)
            throws SocketException
Overrides:
setTcpNoDelay in interface Socket

setTrafficClass

public void setTrafficClass(int i)
            throws SocketException
Overrides:
setTrafficClass in interface Socket

shutdownInput

public void shutdownInput()
            throws IOException
Overrides:
shutdownInput in interface Socket

shutdownOutput

public void shutdownOutput()
            throws IOException
Overrides:
shutdownOutput in interface Socket

LocalSocket.java -- a unix domain client socket. Copyright (C) 2006 Free Software Foundation, Inc. This file is a part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.