FileDocCategorySizeDatePackage
DefaultSocketFactoryImpl.javaAPI DocJava SE 5 API2198Fri Aug 26 14:54:32 BST 2005com.sun.corba.se.impl.transport

DefaultSocketFactoryImpl

public class DefaultSocketFactoryImpl extends Object implements com.sun.corba.se.spi.transport.ORBSocketFactory

Fields Summary
private com.sun.corba.se.spi.orb.ORB
orb
Constructors Summary
Methods Summary
public java.net.ServerSocketcreateServerSocket(java.lang.String type, java.net.InetSocketAddress inetSocketAddress)

	ServerSocketChannel serverSocketChannel = null;
	ServerSocket serverSocket = null;

	if (orb.getORBData().acceptorSocketType().equals(ORBConstants.SOCKETCHANNEL)) {
	    serverSocketChannel = ServerSocketChannel.open();
	    serverSocket = serverSocketChannel.socket();
	} else {
	    serverSocket = new ServerSocket();
	}
	serverSocket.bind(inetSocketAddress);
	return serverSocket;
    
public java.net.SocketcreateSocket(java.lang.String type, java.net.InetSocketAddress inetSocketAddress)

	SocketChannel socketChannel = null;
	Socket socket = null;

	if (orb.getORBData().connectionSocketType().equals(ORBConstants.SOCKETCHANNEL)) {
	    socketChannel = SocketChannel.open(inetSocketAddress);
	    socket = socketChannel.socket();
	} else {
	    socket = new Socket(inetSocketAddress.getHostName(),
				inetSocketAddress.getPort());
	}

	// Disable Nagle's algorithm (i.e., always send immediately).
	socket.setTcpNoDelay(true);

	return socket;
    
public voidsetAcceptedSocketOptions(com.sun.corba.se.pept.transport.Acceptor acceptor, java.net.ServerSocket serverSocket, java.net.Socket socket)

	// Disable Nagle's algorithm (i.e., always send immediately).
	socket.setTcpNoDelay(true);
    
public voidsetORB(com.sun.corba.se.spi.orb.ORB orb)

	this.orb = orb;