< prev index next >

src/jdk.security.jgss/share/classes/com/sun/security/jgss/Extender.java

Print this page
rev 15764 : 8167181: Exported elements referring to inaccessible types in jdk.security.jgss


  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package com.sun.security.jgss;
  27 
  28 import org.ietf.jgss.GSSContext;
  29 import org.ietf.jgss.GSSCredential;
  30 import sun.security.jgss.GSSContextImpl;
  31 import sun.security.jgss.GSSCredentialImpl;
  32 import sun.security.jgss.JgssExtender;
  33 
  34 // The com.sun.security.jgss extension to JGSS-API
  35 class Extender extends JgssExtender {
  36 
  37     static {
  38         JgssExtender.setExtender(new Extender());
  39     }
  40 
  41     public GSSCredential wrap(GSSCredential cred) {
  42         if (cred instanceof ExtendedGSSCredential.ExtendedGSSCredentialImpl) {
  43             return cred;
  44         } else {
  45             return new ExtendedGSSCredential.ExtendedGSSCredentialImpl((GSSCredentialImpl)cred);
  46         }
  47     }
  48 
  49     public GSSContext wrap(GSSContext ctxt) {
  50         if (ctxt instanceof ExtendedGSSContext.ExtendedGSSContextImpl) {
  51             return ctxt;
  52         } else {
  53             return new ExtendedGSSContext.ExtendedGSSContextImpl((GSSContextImpl)ctxt);
  54         }
  55     }
  56 }


  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package com.sun.security.jgss;
  27 
  28 import org.ietf.jgss.GSSContext;
  29 import org.ietf.jgss.GSSCredential;
  30 import sun.security.jgss.GSSContextImpl;
  31 import sun.security.jgss.GSSCredentialImpl;
  32 import sun.security.jgss.JgssExtender;
  33 
  34 // The com.sun.security.jgss extension to JGSS-API
  35 class Extender extends JgssExtender {
  36 
  37     static {
  38         JgssExtender.setExtender(new Extender());
  39     }
  40 
  41     public GSSCredential wrap(GSSCredential cred) {
  42         if (cred instanceof ExtendedGSSCredentialImpl) {
  43             return cred;
  44         } else {
  45             return new ExtendedGSSCredentialImpl((GSSCredentialImpl)cred);
  46         }
  47     }
  48 
  49     public GSSContext wrap(GSSContext ctxt) {
  50         if (ctxt instanceof ExtendedGSSContextImpl) {
  51             return ctxt;
  52         } else {
  53             return new ExtendedGSSContextImpl((GSSContextImpl)ctxt);
  54         }
  55     }
  56 }
< prev index next >