FileDocCategorySizeDatePackage
IORAddrAnyInitializer.javaAPI DocGlassfish v2 API5340Fri May 04 22:34:54 BST 2007com.sun.enterprise.iiop

IORAddrAnyInitializer

public class IORAddrAnyInitializer extends org.omg.CORBA.LocalObject implements org.omg.PortableInterceptor.ORBInitializer
This class is used to add IOR interceptors for supporting IN_ADDR_ANY functionality in the ORB

Fields Summary
private static Logger
_logger
public static final String
baseMsg
Constructors Summary
public IORAddrAnyInitializer()
Creates a new instance of IORAddrAnyInitializer

    
           
      
    
Methods Summary
public voidpost_init(org.omg.PortableInterceptor.ORBInitInfo info)
Called during ORB initialization. If a service must resolve initial references as part of its initialization, it can assume that all initial references will be available at this point.

Calling the post_init operations is not the final task of ORB initialization. The final task, following the post_init calls, is attaching the lists of registered interceptors to the ORB. Therefore, the ORB does not contain the interceptors during calls to post_init. If an ORB-mediated call is made from within post_init, no request interceptors will be invoked on that call. Likewise, if an operation is performed which causes an IOR to be created, no IOR interceptors will be invoked.

param
info provides initialization attributes and operations by which Interceptors can be registered.

        Codec codec = null;
        CodecFactory cf = info.codec_factory();
  
        byte major_version = 1;
        byte minor_version = 2;
        Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value, 
                                         major_version, minor_version);
        try {
            codec = cf.create_codec(encoding);
        } catch (org.omg.IOP.CodecFactoryPackage.UnknownEncoding e) {
            _logger.log(Level.WARNING,"UnknownEncoding from " + baseMsg,e);
	    }
        try {
            info.add_ior_interceptor(new IORAddrAnyInterceptor(codec));
        } catch (DuplicateName ex) {
            _logger.log(Level.WARNING,"DuplicateName from " + baseMsg,ex);
        }
    
public voidpre_init(org.omg.PortableInterceptor.ORBInitInfo info)
Called during ORB initialization. If it is expected that initial services registered by an interceptor will be used by other interceptors, then those initial services shall be registered at this point via calls to ORBInitInfo.register_initial_reference.

param
info provides initialization attributes and operations by which Interceptors can be registered.