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


Java LogKeywords类代码示例

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


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

示例1: list

import com.sun.corba.se.impl.orbutil.LogKeywords; //导入依赖的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: new_context

import com.sun.corba.se.impl.orbutil.LogKeywords; //导入依赖的package包/类
/**
 * Create a NamingContext object and return its object reference.
 * @return an object reference for a new NamingContext object implemented
 * by this Name Server.
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 */
public synchronized NamingContext new_context()
{
    // Create actually creates a new naming context
    lifecycleLogger.fine( "Creating New Naming Context " );
    NamingContextDataStore impl = (NamingContextDataStore)this;
    synchronized (impl) {
        NamingContext nctx = impl.NewContext();
        if( nctx != null ) {
            lifecycleLogger.fine( LogKeywords.LIFECYCLE_CREATE_SUCCESS );
        } else {
            // If naming context is null, then that must be a serious
            // error.
            lifecycleLogger.severe ( LogKeywords.LIFECYCLE_CREATE_FAILURE );
        }
        return nctx;
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:25,代码来源:NamingContextImpl.java

示例3: destroy

import com.sun.corba.se.impl.orbutil.LogKeywords; //导入依赖的package包/类
/**
 * Destroy this NamingContext object. If this NamingContext contains
 * no bindings, the NamingContext is deleted.
 * @exception org.omg.CosNaming.NamingContextPackage.NotEmpty This
 * NamingContext is not empty (i.e., contains bindings).
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 */
public  void destroy()
    throws org.omg.CosNaming.NamingContextPackage.NotEmpty
{
    lifecycleLogger.fine( "Destroying Naming Context " );
    NamingContextDataStore impl = (NamingContextDataStore)this;
    synchronized (impl) {
        if (impl.IsEmpty() == true) {
            // The context is empty so it can be destroyed
            impl.Destroy();
            lifecycleLogger.fine ( LogKeywords.LIFECYCLE_DESTROY_SUCCESS );
        }
        else {
            // This context is not empty!
            // Not a fatal error, warning should do.
            lifecycleLogger.warning( LogKeywords.LIFECYCLE_DESTROY_FAILURE +
                " NamingContext children are not destroyed still.." );
            throw new NotEmpty();
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:29,代码来源:NamingContextImpl.java

示例4: Bind

import com.sun.corba.se.impl.orbutil.LogKeywords; //导入依赖的package包/类
/**
 * Binds the object to the name component as the specified binding type.
 * It creates a InternalBindingKey object and a InternalBindingValue
 * object and inserts them in the hash table.
 * @param n A single org.omg.CosNaming::NameComponent under which the
 * object will be bound.
 * @param obj An object reference to be bound under the supplied name.
 * @param bt The type of the binding (i.e., as object or as context).
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 */
public final void Bind(NameComponent n, org.omg.CORBA.Object obj,
                       BindingType bt)
    throws org.omg.CORBA.SystemException
{
    // Create a key and a value
    InternalBindingKey key = new InternalBindingKey(n);
    NameComponent[] name = new NameComponent[1];
    name[0] = n;
    Binding b = new Binding(name,bt);
    InternalBindingValue value = new InternalBindingValue(b,null);
    value.theObjectRef = obj;
    // insert it
    InternalBindingValue oldValue =
        (InternalBindingValue)this.theHashtable.put(key,value);

    if (oldValue != null) {
        updateLogger.warning( LogKeywords.NAMING_BIND + "Name " +
            getName( n ) + " Was Already Bound" );
        throw wrapper.transNcBindAlreadyBound() ;
    }
    if( updateLogger.isLoggable( Level.FINE ) ) {
        updateLogger.fine( LogKeywords.NAMING_BIND_SUCCESS +
            "Name Component: " + n.id + "." + n.kind );
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:TransientNamingContext.java

示例5: Unbind

import com.sun.corba.se.impl.orbutil.LogKeywords; //导入依赖的package包/类
/**
 * Deletes the binding with the supplied name. It creates a
 * InternalBindingKey and uses it to remove the value associated
 * with the key. If nothing is found an exception is thrown, otherwise
 * the element is removed from the hash table.
 * @param n a NameComponent which is the name to unbind
 * @return the object reference bound to the name, or null if not found.
 * @exception org.omg.CORBA.SystemException One of a fixed set of CORBA
 * system exceptions.
 */
public final org.omg.CORBA.Object Unbind(NameComponent n)
    throws org.omg.CORBA.SystemException
{
    // Create a key and remove it from the hashtable
    InternalBindingKey key = new InternalBindingKey(n);
    InternalBindingValue value =
        (InternalBindingValue)this.theHashtable.remove(key);

    // Return what was found
    if (value == null) {
        if( updateLogger.isLoggable( Level.FINE ) ) {
            updateLogger.fine( LogKeywords.NAMING_UNBIND_FAILURE +
                " There was no binding with the name " + getName( n ) +
                " to Unbind " );
        }
        return null;
    } else {
        if( updateLogger.isLoggable( Level.FINE ) ) {
            updateLogger.fine( LogKeywords.NAMING_UNBIND_SUCCESS +
                " NameComponent:  " + getName( n ) );
        }
        return value.theObjectRef;
   }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:35,代码来源:TransientNamingContext.java


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