Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  
  /*
   *  Copyright (C) 2010-2011 Oracle Corporation
   *
   *  This file is part of the VirtualBox SDK, as available from
   *  http://www.virtualbox.org.  This library is free software; you can
   *  redistribute it and/or modify it under the terms of the GNU Lesser General
   *  Public License as published by the Free Software Foundation, in version 2.1
   *  as it comes in the "COPYING.LIB" file of the VirtualBox SDK distribution.
  *  This library 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 Lesser General Public
  *  License for more details.
  *
  * IDHCPServer.java
  *
  * DO NOT EDIT! This is a generated file.
  * Generated from: src/VBox/Main/idl/VirtualBox.xidl (VirtualBox's interface definitions in XML)
  * Generator: src/VBox/Main/glue/glue-java.xsl
  */
 
 package org.virtualbox_4_2;
 
 import javax.xml.ws.*;
 import java.util.List;

The IDHCPServer interface represents the vbox DHCP server configuration. To enumerate all the DHCP servers on the host, use the IVirtualBox.getDHCPServers() attribute. Interface ID: {6CFE387C-74FB-4CA7-BFF6-973BEC8AF7A3}
 
 public class IDHCPServer extends IUnknown {
 
     public IDHCPServer(String wrappedVboxPortType port) {
           super(wrappedport);
     }
specifies if the DHCP server is enabled

Returns:
Boolean
 
     public Boolean getEnabled() {
       try {
          Boolean retVal = .idhcpServerGetEnabled();
          return retVal;
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
specifies if the DHCP server is enabled

Parameters:
value Boolean
 
     public void setEnabled(Boolean value) {
       try {
         .idhcpServerSetEnabled(value);
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
specifies server IP

Returns:
String
 
     public String getIPAddress() {
       try {
          String retVal = .idhcpServerGetIPAddress();
          return retVal;
      } catch (InvalidObjectFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      } catch (RuntimeFaultMsg e) {
           throw new VBoxException(ee.getMessage());
      }
     }
specifies server network mask

Returns:
String
 
     public String getNetworkMask() {
      try {
         String retVal = .idhcpServerGetNetworkMask();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
specifies internal network name the server is used for

Returns:
String
    public String getNetworkName() {
      try {
         String retVal = .idhcpServerGetNetworkName();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
specifies from IP address in server address range

Returns:
String
    public String getLowerIP() {
      try {
         String retVal = .idhcpServerGetLowerIP();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
specifies to IP address in server address range

Returns:
String
    public String getUpperIP() {
      try {
         String retVal = .idhcpServerGetUpperIP();
         return retVal;
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
    public static IDHCPServer queryInterface(IUnknown obj) {
       return obj == null ?  null : new IDHCPServer(obj.getWrapped(), obj.getRemoteWSPort());
    }
configures the server

Parameters:
IPAddress server IP address
networkMask server network mask
FromIPAddress server From IP address for address range
ToIPAddress server To IP address for address range Expected result codes:
E_INVALIDARG invalid configuration supplied
    public void setConfiguration(String IPAddressString networkMaskString FromIPAddressString ToIPAddress) {
      try {
        .idhcpServerSetConfiguration(IPAddressnetworkMaskFromIPAddressToIPAddress);
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Starts DHCP server process.

Parameters:
networkName Name of internal network DHCP server should attach to.
trunkName Name of internal network trunk.
trunkType Type of internal network trunk. Expected result codes:
E_FAIL Failed to start the process.
    public void start(String networkNameString trunkNameString trunkType) {
      try {
        .idhcpServerStart(networkNametrunkNametrunkType);
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
Stops DHCP server process. Expected result codes:
E_FAIL Failed to stop the process.
    public void stop() {
      try {
        .idhcpServerStop();
     } catch (InvalidObjectFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     } catch (RuntimeFaultMsg e) {
          throw new VBoxException(ee.getMessage());
     }
    }
New to GrepCode? Check out our FAQ X