Example usage for java.net DatagramSocket setDatagramSocketImplFactory

List of usage examples for java.net DatagramSocket setDatagramSocketImplFactory

Introduction

In this page you can find the example usage for java.net DatagramSocket setDatagramSocketImplFactory.

Prototype

public static synchronized void setDatagramSocketImplFactory(DatagramSocketImplFactory fac) throws IOException 

Source Link

Document

Sets the datagram socket implementation factory for the application.

Usage

From source file:org.jboss.as.capedwarf.extension.CapedwarfSubsystemAdd.java

protected static void registerSocketFactory() throws OperationFailedException {
    try {//from   w ww .ja  va 2s  . c o  m
        Socket.setSocketImplFactory(CapedwarfSocketFactory.INSTANCE);
        DatagramSocket.setDatagramSocketImplFactory(CapedwarfSocketFactory.INSTANCE);
    } catch (IOException e) {
        throw new OperationFailedException(e.getMessage(), e);
    }
}