当前位置: 首页>>代码示例>>Java>>正文


Java BindingListHolder类代码示例

本文整理汇总了Java中org.omg.CosNaming.BindingListHolder的典型用法代码示例。如果您正苦于以下问题:Java BindingListHolder类的具体用法?Java BindingListHolder怎么用?Java BindingListHolder使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


BindingListHolder类属于org.omg.CosNaming包,在下文中一共展示了BindingListHolder类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: list

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/**
 * List the contents of this NamingContest. A sequence of bindings
 * is returned (a BindingList) containing up to the number of requested
 * bindings, and a BindingIterator object reference is returned for
 * iterating over the remaining bindings.
 * @param how_many The number of requested bindings in the BindingList.
 * @param bl The BindingList as an out parameter.
 * @param bi The BindingIterator as an out parameter.
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 * @see BindingListHolder
 * @see BindingIteratorImpl
 */
public  void list(int how_many, BindingListHolder bl,
    BindingIteratorHolder bi)
{
    // List actually generates the list
    NamingContextDataStore impl = (NamingContextDataStore)this;
    synchronized (impl) {
        impl.List(how_many,bl,bi);
    }
    if( readLogger.isLoggable( Level.FINE ) && (bl.value != null )) {
        // isLoggable call to make sure that we save some precious
        // processor cycles, if there is no need to log.
        readLogger.fine ( LogKeywords.NAMING_LIST_SUCCESS +
            "list(" + how_many + ") -> bindings[" + bl.value.length +
            "] + iterator: " + bi.value);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:30,代码来源:NamingContextImpl.java

示例2: listBindings

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/**
 * Creates and returns the enumeration over the name - object bindings that
 * are present the given subcontext. The enumeration elements have the type of
 * {@link Binding}, providing also information about the class of the bound
 * object. The behaviour in the case if the bindings are added or removed
 * later is not defined. The contents of the subcontexts are not included.
 *
 * @param name
 *          the name of the subcontext
 * @return the enumeration over the names, known for the given subcontext.
 * @throws NamingException
 */
public NamingEnumeration listBindings(Name name) throws NamingException
{
  BindingIteratorHolder bi = new BindingIteratorHolder();
  BindingListHolder bl = new BindingListHolder();

  NamingContext subcontext;

  if (name.size() == 0)
    subcontext = service;
  else
    {
      try
        {
          subcontext = (NamingContextHelper.narrow(service.resolve(toGiop(name))));
        }
      catch (Exception e)
        {
          throw new NamingException(e.toString());
        }
    }

  subcontext.list(howMany, bl, bi);

  return new ListBindingsEnumeration(bl, bi, howMany, subcontext);
}
 
开发者ID:vilie,项目名称:javify,代码行数:38,代码来源:ContextContinuation.java

示例3: getMore

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/**
 * Tries to obtain more elements, return true on success. Updates the fields
 * accordingly.
 */
boolean getMore()
{
  if (iterator != null)
    {
      BindingListHolder holder = new BindingListHolder();
      boolean rt = iterator.next_n(batch, holder);
      if (rt)
        {
          // The new pack of the bindings arrived.
          p = 0;
          list = holder.value;
          return true;
        }
      else
        {
          iterator.destroy();
          iterator = null;
          p = -1;
          return false;
        }
    }
  else
    return false;
}
 
开发者ID:vilie,项目名称:javify,代码行数:29,代码来源:GiopNamingEnumeration.java

示例4: next_n

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/**
 * Return the desired amount of bindings.
 *
 * @param amount the maximal number of bindings to return.
 * @param a_list a holder to store the returned bindings.
 *
 * @return false if there are no more bindings available,
 * true otherwise.
 */
public boolean next_n(int amount, BindingListHolder a_list)
{
  if (p < bindings.length)
    {
      int n = bindings.length - p;
      if (n > amount)
        n = amount;

      a_list.value = new Binding[ n ];
      for (int i = 0; i < n; i++)
        a_list.value [ i ] = bindings [ p++ ];

      return true;
    }
  else
    {
      a_list.value = new Binding[ 0 ];
      return false;
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:30,代码来源:Binding_iterator_impl.java

示例5: listBindings

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/**
 * Creates and returns the enumeration over the name - object bindings that
 * are present the given subcontext. The enumeration elements have the type of
 * {@link Binding}, providing also information about the class of the bound
 * object. The behaviour in the case if the bindings are added or removed
 * later is not defined. The contents of the subcontexts are not included.
 * 
 * @param name
 *          the name of the subcontext
 * @return the enumeration over the names, known for the given subcontext.
 * @throws NamingException
 */
public NamingEnumeration listBindings(Name name) throws NamingException
{
  BindingIteratorHolder bi = new BindingIteratorHolder();
  BindingListHolder bl = new BindingListHolder();

  NamingContext subcontext;

  if (name.size() == 0)
    subcontext = service;
  else
    {
      try
        {
          subcontext = (NamingContextHelper.narrow(service.resolve(toGiop(name))));
        }
      catch (Exception e)
        {
          throw new NamingException(e.toString());
        }
    }

  subcontext.list(howMany, bl, bi);

  return new ListBindingsEnumeration(bl, bi, howMany, subcontext);
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:38,代码来源:ContextContinuation.java

示例6: list

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/**
 * lists next n bindings. It returns true or false, indicating
 * whether there were more bindings. This method has the package private
 * scope, It will be called from NamingContext.list() operation or
 * this.next_n().
 * @param how_many The number of requested bindings in the BindingList.
 * @param bl The BindingList as an out parameter.
 * @return true if there were more bindings.
 */
public boolean list( int how_many, org.omg.CosNaming.BindingListHolder blh)
{
    // Take the smallest of what's left and what's being asked for
    int numberToGet = Math.min(RemainingElements(),how_many);

    // Create a resulting BindingList
    Binding[] bl = new Binding[numberToGet];
    BindingHolder bh = new BindingHolder();
    int i = 0;
    // Keep iterating as long as there are entries
    while (i < numberToGet && this.NextOne(bh) == true) {
        bl[i] = bh.value;
        i++;
    }
    // Found any at all?
    if (i == 0) {
        // No
        blh.value = new Binding[0];
        return false;
    }

    // Set into holder
    blh.value = bl;

    return true;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:36,代码来源:BindingIteratorImpl.java

示例7: list

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/**
 * lists next n bindings. It returns true or false, indicating
 * whether there were more bindings. This method has the package private
 * scope, It will be called from NamingContext.list() operation or
 * this.next_n().
 * @param how_many The number of requested bindings in the BindingList.
 * @param blh The BindingList as an out parameter.
 * @return true if there were more bindings.
 */
public boolean list( int how_many, org.omg.CosNaming.BindingListHolder blh)
{
    // Take the smallest of what's left and what's being asked for
    int numberToGet = Math.min(RemainingElements(),how_many);

    // Create a resulting BindingList
    Binding[] bl = new Binding[numberToGet];
    BindingHolder bh = new BindingHolder();
    int i = 0;
    // Keep iterating as long as there are entries
    while (i < numberToGet && this.NextOne(bh) == true) {
        bl[i] = bh.value;
        i++;
    }
    // Found any at all?
    if (i == 0) {
        // No
        blh.value = new Binding[0];
        return false;
    }

    // Set into holder
    blh.value = bl;

    return true;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:36,代码来源:BindingIteratorImpl.java

示例8: list

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/**
 * Creates and returns the enumeration over the name bindings that are present
 * the given subcontext. The enumeration elements have the type of
 * {@link NameClassPair}, providing also information about the class of the
 * bound object. The behaviour in the case if the bindings are added or
 * removed later is not defined. The contents of the subcontexts are not
 * included.
 *
 * @param name
 *          the name of the subcontext
 * @return the enumeration over the names, known for the given subcontext.
 * @throws NamingException
 */
public NamingEnumeration list(Name name) throws NamingException
{
  BindingIteratorHolder bi = new BindingIteratorHolder();
  BindingListHolder bl = new BindingListHolder();

  NamingContext subcontext;

  if (name.size() == 0)
    subcontext = service;
  else
    {
      try
        {
          subcontext = (NamingContextHelper.narrow(service.resolve(toGiop(name))));
        }
      catch (Exception e)
        {
          throw new NamingException(e.toString());
        }

    }

  subcontext.list(howMany, bl, bi);

  return new ListEnumeration(bl, bi, howMany);
}
 
开发者ID:vilie,项目名称:javify,代码行数:40,代码来源:ContextContinuation.java

示例9: list

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/**
 * Creates and returns the enumeration over the name bindings that are present
 * the given subcontext. The enumeration elements have the type of
 * {@link NameClassPair}, providing also information about the class of the
 * bound object. The behaviour in the case if the bindings are added or
 * removed later is not defined. The contents of the subcontexts are not
 * included.
 *
 * @param name
 *          the name of the subcontext
 * @return the enumeration over the names, known for the given subcontext.
 * @throws NamingException
 */
public NamingEnumeration list(String name) throws NamingException
{
  BindingIteratorHolder bi = new BindingIteratorHolder();
  BindingListHolder bl = new BindingListHolder();

  NamingContext subcontext;

  String [] n = split(name);
  NamingContextExt service = getService(n[0]);

  if (n[1].length() == 0)
    subcontext = service;
  else
    {
      try
        {
          subcontext = (NamingContextHelper.narrow(service.resolve_str(n[1])));
        }
      catch (Exception e)
        {
          throw new NamingException(e.toString());
        }

    }

  subcontext.list(howMany, bl, bi);

  return new ListEnumeration(bl, bi, howMany);
}
 
开发者ID:vilie,项目名称:javify,代码行数:43,代码来源:GiopNamingServiceURLContext.java

示例10: listBindings

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/**
 * Creates and returns the enumeration over the name - object bindings that
 * are present the given subcontext. The enumeration elements have the type of
 * {@link Binding}, providing also information about the class of the bound
 * object. The behaviour in the case if the bindings are added or removed
 * later is not defined. The contents of the subcontexts are not included.
 *
 * @param name
 *          the name of the subcontext
 * @return the enumeration over the names, known for the given subcontext.
 * @throws NamingException
 */
public NamingEnumeration listBindings(String name) throws NamingException
{
  BindingIteratorHolder bi = new BindingIteratorHolder();
  BindingListHolder bl = new BindingListHolder();

  NamingContext subcontext;

  String [] n = split(name);
  NamingContextExt service = getService(n[0]);

  if (n[1].length() == 0)
    subcontext = service;
  else
    {
      try
        {
          subcontext = (NamingContextHelper.narrow(service.resolve_str(n[1])));
        }
      catch (Exception e)
        {
          throw new NamingException(e.toString());
        }

    }

  subcontext.list(howMany, bl, bi);

  return new ListBindingsEnumeration(bl, bi, howMany, subcontext);
}
 
开发者ID:vilie,项目名称:javify,代码行数:42,代码来源:GiopNamingServiceURLContext.java

示例11: list

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/** {@inheritDoc} */
public void list(int amount, BindingListHolder a_list,
                 BindingIteratorHolder an_iter
                )
{
  classic.list(amount, a_list, an_iter);
}
 
开发者ID:vilie,项目名称:javify,代码行数:8,代码来源:Ext.java

示例12: list

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/**
 * Iterate over all bindings, defined in this namind context.
 *
 * @param amount the maximal number of context to return in the
 * holder a_list. The remaining bindings are accessible via iterator
 * an_iter. If the parameter amount is zero, all bindings are accessed only
 * via this iterator.
 *
 * This implementation list contexts first, then objects.
 *
 * @param a_list the holder, where the returned bindigs are stored.
 * @param an_iter the iterator that can be used to access the remaining
 * bindings.
 */
public void list(int amount, BindingListHolder a_list,
                 BindingIteratorHolder an_iter
                )
{
  int nb = named_contexts.size() + named_objects.size();
  int nl = nb;
  if (nl > amount)
    nl = amount;

  a_list.value = new Binding[ nl ];

  Iterator contexts = named_contexts.entries().iterator();
  Iterator objects = named_objects.entries().iterator();

  // Create a binding list.
  for (int i = 0; i < nl; i++)
    {
      if (contexts.hasNext())
        a_list.value [ i ] = mkBinding(contexts.next(), BindingType.ncontext);
      else if (objects.hasNext())
        a_list.value [ i ] = mkBinding(objects.next(), BindingType.nobject);
      else
        throw new InternalError();
    }

  // Create an iterator.
  Binding[] remainder = new Binding[ nb - nl ];
  int p = 0;

  while (contexts.hasNext())
    remainder [ p++ ] = mkBinding(contexts.next(), BindingType.ncontext);

  while (objects.hasNext())
    remainder [ p++ ] = mkBinding(objects.next(), BindingType.nobject);

  Binding_iterator_impl bit = new Binding_iterator_impl(remainder);
  _orb().connect(bit);
  an_iter.value = bit;
}
 
开发者ID:vilie,项目名称:javify,代码行数:54,代码来源:TransientContext.java

示例13: list

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/**
 * Creates and returns the enumeration over the name bindings that are present
 * the given subcontext. The enumeration elements have the type of
 * {@link NameClassPair}, providing also information about the class of the
 * bound object. The behaviour in the case if the bindings are added or
 * removed later is not defined. The contents of the subcontexts are not
 * included.
 * 
 * @param name
 *          the name of the subcontext
 * @return the enumeration over the names, known for the given subcontext.
 * @throws NamingException
 */
public NamingEnumeration list(Name name) throws NamingException
{
  BindingIteratorHolder bi = new BindingIteratorHolder();
  BindingListHolder bl = new BindingListHolder();

  NamingContext subcontext;

  if (name.size() == 0)
    subcontext = service;
  else
    {
      try
        {
          subcontext = (NamingContextHelper.narrow(service.resolve(toGiop(name))));
        }
      catch (Exception e)
        {
          throw new NamingException(e.toString());
        }

    }

  subcontext.list(howMany, bl, bi);

  return new ListEnumeration(bl, bi, howMany);
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:40,代码来源:ContextContinuation.java

示例14: list

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/**
 * Creates and returns the enumeration over the name bindings that are present
 * the given subcontext. The enumeration elements have the type of
 * {@link NameClassPair}, providing also information about the class of the
 * bound object. The behaviour in the case if the bindings are added or
 * removed later is not defined. The contents of the subcontexts are not
 * included.
 * 
 * @param name
 *          the name of the subcontext
 * @return the enumeration over the names, known for the given subcontext.
 * @throws NamingException
 */
public NamingEnumeration list(String name) throws NamingException
{
  BindingIteratorHolder bi = new BindingIteratorHolder();
  BindingListHolder bl = new BindingListHolder();

  NamingContext subcontext;
  
  String [] n = split(name);
  NamingContextExt service = getService(n[0]);

  if (n[1].length() == 0)
    subcontext = service;
  else
    {
      try
        {
          subcontext = (NamingContextHelper.narrow(service.resolve_str(n[1])));
        }
      catch (Exception e)
        {
          throw new NamingException(e.toString());
        }

    }

  subcontext.list(howMany, bl, bi);

  return new ListEnumeration(bl, bi, howMany);
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:43,代码来源:GiopNamingServiceURLContext.java

示例15: listBindings

import org.omg.CosNaming.BindingListHolder; //导入依赖的package包/类
/**
 * Creates and returns the enumeration over the name - object bindings that
 * are present the given subcontext. The enumeration elements have the type of
 * {@link Binding}, providing also information about the class of the bound
 * object. The behaviour in the case if the bindings are added or removed
 * later is not defined. The contents of the subcontexts are not included.
 * 
 * @param name
 *          the name of the subcontext
 * @return the enumeration over the names, known for the given subcontext.
 * @throws NamingException
 */
public NamingEnumeration listBindings(String name) throws NamingException
{
  BindingIteratorHolder bi = new BindingIteratorHolder();
  BindingListHolder bl = new BindingListHolder();

  NamingContext subcontext;
  
  String [] n = split(name);
  NamingContextExt service = getService(n[0]);

  if (n[1].length() == 0)
    subcontext = service;
  else
    {
      try
        {
          subcontext = (NamingContextHelper.narrow(service.resolve_str(n[1])));
        }
      catch (Exception e)
        {
          throw new NamingException(e.toString());
        }

    }

  subcontext.list(howMany, bl, bi);

  return new ListBindingsEnumeration(bl, bi, howMany, subcontext);
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:42,代码来源:GiopNamingServiceURLContext.java


注:本文中的org.omg.CosNaming.BindingListHolder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。