TPTP 4.6.0 Platform Project
Internal API Specification

org.eclipse.hyades.internal.execution.core.file.socket
Interface ISocketChannelFactory

All Known Implementing Classes:
SecureConnectionImpl, SocketChannelFactory

public interface ISocketChannelFactory

The socket channel factory creates socket channel objects given some seed information such as socket, real channel or connection information to establish a new socket channel.


Method Summary
 ISocketChannel create(java.net.InetSocketAddress address)
          Creates a local socket channel abstraction over a new socket to be established at the given internet socket address, basically connects to the address given, establishes a socket to the other side and returns back an abstraction to manipulate the connection with -- this method creates a new connection at the given address or returns back an existing connection that is not in use (with no contention with another client possible)
 ISocketChannel create(java.net.InetSocketAddress address, int timeout)
          Creates a local socket channel abstraction over a new socket to be established at the given internet socket address, basically connects to the address given, establishes a socket to the other side and returns back an abstraction to manipulate the connection with -- this method creates a new connection at the given address or returns back an existing connection that is not in use (with no contention with another client possible)
 ISocketChannel create(java.net.Socket socket)
          Creates a local socket channel abstraction for the given socket, this does not create a new connection, simply wraps a java.nio channel with a local abstraction
 ISocketChannel create(java.nio.channels.SocketChannel realChannel)
          Creates a local socket channel abstraction for the given standard channel, this does not create a new connection, simply wraps a java.nio channel with a local abstraction
 

Method Detail

create

ISocketChannel create(java.net.InetSocketAddress address)
                      throws java.io.IOException
Creates a local socket channel abstraction over a new socket to be established at the given internet socket address, basically connects to the address given, establishes a socket to the other side and returns back an abstraction to manipulate the connection with -- this method creates a new connection at the given address or returns back an existing connection that is not in use (with no contention with another client possible)

Parameters:
address - the address to establish a connection to
Returns:
a new socket channel to use
Throws:
java.io.IOException - throws an IO exception if socket problems arise

create

ISocketChannel create(java.net.InetSocketAddress address,
                      int timeout)
                      throws java.io.IOException
Creates a local socket channel abstraction over a new socket to be established at the given internet socket address, basically connects to the address given, establishes a socket to the other side and returns back an abstraction to manipulate the connection with -- this method creates a new connection at the given address or returns back an existing connection that is not in use (with no contention with another client possible)

Parameters:
address - the address to establish a connection to
timeout - timeout to use for the connection
Returns:
a new socket channel to use
Throws:
java.io.IOException - throws an IO exception if socket problems arise

create

ISocketChannel create(java.nio.channels.SocketChannel realChannel)
Creates a local socket channel abstraction for the given standard channel, this does not create a new connection, simply wraps a java.nio channel with a local abstraction

Parameters:
realChannel - the standard Java abstraction
Returns:
the local socket channel interface, abstracting the real socket channel and associated socket

create

ISocketChannel create(java.net.Socket socket)
                      throws java.io.IOException
Creates a local socket channel abstraction for the given socket, this does not create a new connection, simply wraps a java.nio channel with a local abstraction

Parameters:
socket - the socket to seed this socket channel
Returns:
the local socket channel interface abstacting an already existing socket
Throws:
an - IO exception if socket problems arise
java.io.IOException

TPTP 4.6.0 Platform Project
Internal API Specification