72 } 73 74 public static void checkValueType(Object value, Class<?> type) { 75 if (!type.isAssignableFrom(value.getClass())) { 76 String s = "Found: " + value.getClass().toString() + " Expected: " 77 + type.toString(); 78 throw new IllegalArgumentException(s); 79 } 80 } 81 82 private static native void init(); 83 84 /* 85 * Extension native implementations 86 * 87 * SO_FLOW_SLA 88 */ 89 public static native void setFlowOption(FileDescriptor fd, SocketFlow f); 90 public static native void getFlowOption(FileDescriptor fd, SocketFlow f); 91 public static native boolean flowSupported(); 92 } | 72 } 73 74 public static void checkValueType(Object value, Class<?> type) { 75 if (!type.isAssignableFrom(value.getClass())) { 76 String s = "Found: " + value.getClass().toString() + " Expected: " 77 + type.toString(); 78 throw new IllegalArgumentException(s); 79 } 80 } 81 82 private static native void init(); 83 84 /* 85 * Extension native implementations 86 * 87 * SO_FLOW_SLA 88 */ 89 public static native void setFlowOption(FileDescriptor fd, SocketFlow f); 90 public static native void getFlowOption(FileDescriptor fd, SocketFlow f); 91 public static native boolean flowSupported(); 92 93 /* 94 * Extension native implementations 95 * 96 * SO_REUSEPORT 97 */ 98 public static native void setReusePortOption(FileDescriptor fd, boolean on); 99 public static native Object getReusePortOption(FileDescriptor fd); 100 public static native boolean reuseportSupported(); 101 } |