Package net.jini.discovery

Examples of net.jini.discovery.DiscoveryGroupManagement


    // This method's javadoc is inherited from an interface of this class
    public void addLookupGroups(String[] groups) throws NoSuchObjectException {
  concurrentObj.writeLock();
  try {
      ready.check();
      DiscoveryGroupManagement dgm = (DiscoveryGroupManagement) discoer;
      try {
    dgm.addGroups(groups);
      } catch (IOException e) {
    throw new RuntimeException(e.toString());
      }
      lookupGroups = dgm.getGroups();
      addLogRecord(new LookupGroupsChangedLogObj(lookupGroups));
      if (logger.isLoggable(Level.CONFIG)) {
    logger.log(
        Level.CONFIG,
        "added lookup groups {0}",
View Full Code Here


  throws NoSuchObjectException
    {
  concurrentObj.writeLock();
  try {
      ready.check();
      DiscoveryGroupManagement dgm = (DiscoveryGroupManagement) discoer;
      dgm.removeGroups(groups);
      lookupGroups = dgm.getGroups();
      addLogRecord(new LookupGroupsChangedLogObj(lookupGroups));
      if (logger.isLoggable(Level.CONFIG)) {
    logger.log(
        Level.CONFIG,
        "removed lookup groups {0}",
View Full Code Here

    // This method's javadoc is inherited from an interface of this class
    public void setLookupGroups(String[] groups) throws NoSuchObjectException {
  concurrentObj.writeLock();
  try {
      ready.check();
      DiscoveryGroupManagement dgm = (DiscoveryGroupManagement) discoer;
      try {
    dgm.setGroups(groups);
      } catch (IOException e) {
    throw new RuntimeException(e.toString());
      }
      lookupGroups = dgm.getGroups();
      addLogRecord(new LookupGroupsChangedLogObj(lookupGroups));
      if (logger.isLoggable(Level.CONFIG)) {
    logger.log(
        Level.CONFIG,
        "set lookup groups {0}",
View Full Code Here

  if (log != null) {
      log.snapshot();
  }

  try {
      DiscoveryGroupManagement dgm = (DiscoveryGroupManagement) discoer;
      String[] groups = dgm.getGroups();
      if (groups == null || groups.length > 0) {
    throw new ConfigurationException(
        "discoveryManager must be initially configured with " +
        "no groups");
      }
      DiscoveryLocatorManagement dlm =
    (DiscoveryLocatorManagement) discoer;
      if (dlm.getLocators().length > 0) {
    throw new ConfigurationException(
        "discoveryManager must be initially configured with " +
        "no locators");
      }
      dgm.setGroups(lookupGroups);
      dlm.setLocators(lookupLocators);
  } catch (ClassCastException e) {
      throw new ConfigurationException(null, e);
  }
  joiner = new JoinManager(proxy, lookupAttrs, myServiceID,
View Full Code Here

    // This method's javadoc is inherited from an interface of this class
    public void addLookupGroups(String[] groups) throws NoSuchObjectException {
  concurrentObj.writeLock();
  try {
      ready.check();
      DiscoveryGroupManagement dgm = (DiscoveryGroupManagement) discoer;
      try {
    dgm.addGroups(groups);
      } catch (IOException e) {
    throw new RuntimeException(e.toString());
      }
      lookupGroups = dgm.getGroups();
      addLogRecord(new LookupGroupsChangedLogObj(lookupGroups));
      if (logger.isLoggable(Level.CONFIG)) {
    logger.log(
        Level.CONFIG,
        "added lookup groups {0}",
View Full Code Here

  throws NoSuchObjectException
    {
  concurrentObj.writeLock();
  try {
      ready.check();
      DiscoveryGroupManagement dgm = (DiscoveryGroupManagement) discoer;
      dgm.removeGroups(groups);
      lookupGroups = dgm.getGroups();
      addLogRecord(new LookupGroupsChangedLogObj(lookupGroups));
      if (logger.isLoggable(Level.CONFIG)) {
    logger.log(
        Level.CONFIG,
        "removed lookup groups {0}",
View Full Code Here

    // This method's javadoc is inherited from an interface of this class
    public void setLookupGroups(String[] groups) throws NoSuchObjectException {
  concurrentObj.writeLock();
  try {
      ready.check();
      DiscoveryGroupManagement dgm = (DiscoveryGroupManagement) discoer;
      try {
    dgm.setGroups(groups);
      } catch (IOException e) {
    throw new RuntimeException(e.toString());
      }
      lookupGroups = dgm.getGroups();
      addLogRecord(new LookupGroupsChangedLogObj(lookupGroups));
      if (logger.isLoggable(Level.CONFIG)) {
    logger.log(
        Level.CONFIG,
        "set lookup groups {0}",
View Full Code Here

  if (log != null) {
      log.snapshot();
  }

  try {
      DiscoveryGroupManagement dgm = (DiscoveryGroupManagement) discoer;
      String[] groups = dgm.getGroups();
      if (groups == null || groups.length > 0) {
    throw new ConfigurationException(
        "discoveryManager must be initially configured with " +
        "no groups");
      }
      DiscoveryLocatorManagement dlm =
    (DiscoveryLocatorManagement) discoer;
      if (dlm.getLocators().length > 0) {
    throw new ConfigurationException(
        "discoveryManager must be initially configured with " +
        "no locators");
      }
      dgm.setGroups(lookupGroups);
      dlm.setLocators(lookupLocators);
  } catch (ClassCastException e) {
      throw new ConfigurationException(null, e);
  }
  joiner = new JoinManager(proxy, lookupAttrs, myServiceID,
View Full Code Here

    // This method's javadoc is inherited from an interface of this class
    public void addLookupGroups(String[] groups) throws NoSuchObjectException {
  concurrentObj.writeLock();
  try {
      ready.check();
      DiscoveryGroupManagement dgm = (DiscoveryGroupManagement) discoer;
      try {
    dgm.addGroups(groups);
      } catch (IOException e) {
    throw new RuntimeException(e.toString());
      }
      lookupGroups = dgm.getGroups();
      addLogRecord(new LookupGroupsChangedLogObj(lookupGroups));
      if (logger.isLoggable(Level.CONFIG)) {
    logger.log(
        Level.CONFIG,
        "added lookup groups {0}",
View Full Code Here

  throws NoSuchObjectException
    {
  concurrentObj.writeLock();
  try {
      ready.check();
      DiscoveryGroupManagement dgm = (DiscoveryGroupManagement) discoer;
      dgm.removeGroups(groups);
      lookupGroups = dgm.getGroups();
      addLogRecord(new LookupGroupsChangedLogObj(lookupGroups));
      if (logger.isLoggable(Level.CONFIG)) {
    logger.log(
        Level.CONFIG,
        "removed lookup groups {0}",
View Full Code Here

TOP

Related Classes of net.jini.discovery.DiscoveryGroupManagement

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.