Package org.jnode.driver.net

Examples of org.jnode.driver.net.NetworkException


    public void setAuthenticationMode(AuthenticationMode mode) throws NetworkException {
        try {
            getWirelessCore().setAuthenticationMode(mode);
        } catch (DriverException ex) {
            log.debug("setAuthenticationMode failed", ex);
            throw new NetworkException(ex);
        }
    }
View Full Code Here


    public void setESSID(String essid) throws NetworkException {
        try {
            getWirelessCore().setESSID(essid);
        } catch (DriverException ex) {
            log.debug("setESSID failed", ex);
            throw new NetworkException(ex);
        }
    }
View Full Code Here

                public Object run() throws IOException {
                    // Get the API.
                    try {
                        api = device.getAPI(NetDeviceAPI.class);
                    } catch (ApiNotFoundException ex) {
                        throw new NetworkException("Device is not a network device", ex);
                    }
                    configureDevice(device.getId(), api.getAddress());
                    return null;
                }
            });
View Full Code Here

        final IPv4ConfigurationService cfg;
        try {
            cfg = InitialNaming.lookup(IPv4ConfigurationService.NAME);
        } catch (NameNotFoundException ex) {
            throw new NetworkException(ex);
        }
        BOOTPHeader hdr = msg.getHeader();
        cfg.configureDeviceStatic(device, new IPv4Address(hdr
                .getYourIPAddress()), null, false);
View Full Code Here

            if (skbuf.getSize() < ETH_ZLEN) {
                skbuf.append(ETH_ZLEN - skbuf.getSize());
            }
            dd.transmit(skbuf, destination, 5000);
        } catch (InterruptedException ex) {
            throw new NetworkException("Interrupted", ex);
        } catch (TimeoutException ex) {
            throw new NetworkException("Timeout", ex);
        }
    }
View Full Code Here

                skbuf.append(ETH_ZLEN - skbuf.getSize());
            }

            abstractDeviceCore.transmit(skbuf, destination, TRANSMIT_TIMEOUT);
        } catch (InterruptedException ex) {
            throw new NetworkException("Interrupted", ex);
        } catch (TimeoutException ex) {
            throw new NetworkException("Timeout", ex);
        }
    }
View Full Code Here

                    }
                });
            } catch (SecurityException ex) {
                log.error("No permission for set socket factory.", ex);
            } catch (PrivilegedActionException ex) {
                throw new NetworkException(ex.getException());
            }
        } catch (IOException ex) {
            throw new NetworkException(ex);
        }
        timer.start();
    }
View Full Code Here

                skbuf.append(ETH_ZLEN - skbuf.getSize());
            }

            dd.transmit(skbuf, destination, TRANSMIT_TIMEOUT);
        } catch (InterruptedException ex) {
            throw new NetworkException("Interrupted", ex);
        } catch (TimeoutException ex) {
            throw new NetworkException("Timeout", ex);
        }
    }
View Full Code Here

                    }
                }
                resolvers.put(_dnsserver.toString(), resolver);
            }
        } catch (UnknownHostException e) {
            throw new NetworkException("Can't add DNS server", e);
        }

        try {
            String key = _dnsserver.toString();
            if (!resolvers.containsKey(key)) {
                SimpleResolver simpleResolver = new SimpleResolver(key);
                resolver.addResolver(simpleResolver);
                resolvers.put(key, simpleResolver);
            }
        } catch (UnknownHostException e) {
            throw new NetworkException("Can't add DNS server", e);
        }
    }
View Full Code Here

    public void doApply(Device device) throws NetworkException {
        final DHCPClient dhcp = new DHCPClient();
        try {
            dhcp.configureDevice(device);
        } catch (IOException ex) {
            throw new NetworkException(ex);
        }
    }
View Full Code Here

TOP

Related Classes of org.jnode.driver.net.NetworkException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.