Lines Matching +defs:val +defs:opt
204 public void setOption(int opt, Object val) throws SocketException {
209 switch (opt) {
215 if (val == null || (!(val instanceof Integer) && !(val instanceof Boolean)))
217 if (val instanceof Boolean) {
223 if (val == null || (!(val instanceof Integer)))
225 int tmp = ((Integer) val).intValue();
231 if (val == null || !(val instanceof Integer)) {
234 trafficClass = ((Integer)val).intValue();
239 if (val == null || !(val instanceof Boolean))
241 on = ((Boolean)val).booleanValue();
245 if (val == null || !(val instanceof Integer) ||
246 !(((Integer)val).intValue() > 0)) {
252 if (val == null || !(val instanceof Boolean))
254 on = ((Boolean)val).booleanValue();
257 if (val == null || !(val instanceof Boolean))
259 on = ((Boolean)val).booleanValue();
262 if (val == null || !(val instanceof Boolean))
264 on = ((Boolean)val).booleanValue();
267 throw new SocketException("unrecognized TCP option: " + opt);
269 socketSetOption(opt, on, val);
271 public Object getOption(int opt) throws SocketException {
275 if (opt == SO_TIMEOUT) {
284 * if "opt" isn't one it understands.
287 switch (opt) {
289 ret = socketGetOption(opt, null);
292 ret = socketGetOption(opt, null);
295 ret = socketGetOption(opt, null);
298 ret = socketGetOption(opt, null);
302 ret = socketGetOption(opt, in);
306 ret = socketGetOption(opt, null);
309 ret = socketGetOption(opt, null);
316 ret = socketGetOption(opt, null);
708 abstract int socketGetOption(int opt, Object iaContainerObj) throws SocketException;