/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code 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
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* This class consists exclusively of static methods that Sockets or Channels to
* sockets that support the InfiniBand Sockets Direct Protocol (SDP).
*/
public final class Sdp {
private Sdp() { }
/**
* The package-privage ServerSocket(SocketImpl) constructor
*/
static {
try {
} catch (NoSuchMethodException e) {
throw new AssertionError(e);
}
}
/**
* The package-private SdpSocketImpl() constructor
*/
static {
try {
} catch (ClassNotFoundException e) {
throw new AssertionError(e);
} catch (NoSuchMethodException e) {
throw new AssertionError(e);
}
}
o.setAccessible(true);
return null;
}
});
}
/**
* SDP enabled Socket.
*/
super(impl);
}
}
/**
* Creates a SDP enabled SocketImpl
*/
try {
return socketImplCtor.newInstance();
} catch (InstantiationException x) {
throw new AssertionError(x);
} catch (IllegalAccessException x) {
throw new AssertionError(x);
} catch (InvocationTargetException x) {
throw new AssertionError(x);
}
}
/**
* Creates an unconnected and unbound SDP socket. The {@code Socket} is
* associated with a {@link java.net.SocketImpl} of the system-default type.
*
* @return a new Socket
*
* @throws UnsupportedOperationException
* If SDP is not supported
* @throws IOException
* If an I/O error occurs
*/
}
/**
* Creates an unbound SDP server socket. The {@code ServerSocket} is
* associated with a {@link java.net.SocketImpl} of the system-default type.
*
* @return a new ServerSocket
*
* @throws UnsupportedOperationException
* If SDP is not supported
* @throws IOException
* If an I/O error occurs
*/
// create ServerSocket via package-private constructor
try {
} catch (IllegalAccessException x) {
throw new AssertionError(x);
} catch (InstantiationException x) {
throw new AssertionError(x);
} catch (InvocationTargetException x) {
if (cause instanceof IOException)
throw (IOException)cause;
if (cause instanceof RuntimeException)
throw (RuntimeException)cause;
throw new RuntimeException(x);
}
}
/**
* Opens a socket channel to a SDP socket.
*
* <p> The channel will be associated with the system-wide default
* {@link java.nio.channels.spi.SelectorProvider SelectorProvider}.
*
* @return a new SocketChannel
*
* @throws UnsupportedOperationException
* If SDP is not supported or not supported by the default selector
* provider
* @throws IOException
* If an I/O error occurs.
*/
}
/**
* Opens a socket channel to a SDP socket.
*
* <p> The channel will be associated with the system-wide default
* {@link java.nio.channels.spi.SelectorProvider SelectorProvider}.
*
* @return a new ServerSocketChannel
*
* @throws UnsupportedOperationException
* If SDP is not supported or not supported by the default selector
* provider
* @throws IOException
* If an I/O error occurs
*/
throws IOException
{
}
}