< prev index next >

src/java.security.sasl/share/classes/com/sun/security/sasl/ExternalClient.java

Print this page




 124     }
 125 
 126     /**
 127       * Wraps the outgoing buffer.
 128       *
 129       * @throws SaslException Not applicable to this mechanism.
 130       */
 131     public byte[] wrap(byte[] outgoing, int offset, int len)
 132         throws SaslException {
 133         if (completed) {
 134             throw new SaslException("EXTERNAL has no supported QOP");
 135         } else {
 136             throw new IllegalStateException(
 137                 "EXTERNAL authentication not completed");
 138         }
 139     }
 140 
 141     /**
 142      * Retrieves the negotiated property.
 143      * This method can be called only after the authentication exchange has
 144      * completed (i.e., when <tt>isComplete()</tt> returns true); otherwise, a
 145      * <tt>IllegalStateException</tt> is thrown.
 146      *
 147      * @return null No property is applicable to this mechanism.
 148      * @exception IllegalStateException if this authentication exchange
 149      * has not completed
 150      */
 151     public Object getNegotiatedProperty(String propName) {
 152         if (completed) {
 153             return null;
 154         } else {
 155             throw new IllegalStateException(
 156                 "EXTERNAL authentication not completed");
 157         }
 158     }
 159 }


 124     }
 125 
 126     /**
 127       * Wraps the outgoing buffer.
 128       *
 129       * @throws SaslException Not applicable to this mechanism.
 130       */
 131     public byte[] wrap(byte[] outgoing, int offset, int len)
 132         throws SaslException {
 133         if (completed) {
 134             throw new SaslException("EXTERNAL has no supported QOP");
 135         } else {
 136             throw new IllegalStateException(
 137                 "EXTERNAL authentication not completed");
 138         }
 139     }
 140 
 141     /**
 142      * Retrieves the negotiated property.
 143      * This method can be called only after the authentication exchange has
 144      * completed (i.e., when {@code isComplete()} returns true);
 145      * otherwise, an {@code IllegalStateException} is thrown.
 146      *
 147      * @return null No property is applicable to this mechanism.
 148      * @exception IllegalStateException if this authentication exchange
 149      * has not completed
 150      */
 151     public Object getNegotiatedProperty(String propName) {
 152         if (completed) {
 153             return null;
 154         } else {
 155             throw new IllegalStateException(
 156                 "EXTERNAL authentication not completed");
 157         }
 158     }
 159 }
< prev index next >