Package net.jini.io

Examples of net.jini.io.UnsupportedConstraintException


    //inherit javadoc
    public InvocationConstraints checkConstraints(InvocationConstraints ics)
        throws UnsupportedConstraintException {
        if (!ics.isEmpty()){
            throw new UnsupportedConstraintException("This endpoint does not"
                + " support setting constraints on a remote call");
        }
        return InvocationConstraints.EMPTY;
    }
View Full Code Here


            return temp;
        }

        public synchronized OutboundRequest next() throws IOException {
            if (!ics.isEmpty()) {
                throw new UnsupportedConstraintException("TestServerEndpoint"
                    + " does not support settting constraints on a call");
            }
            if (request!=null) {
                String temp = request;
                request = null;
View Full Code Here

     */
    synchronized void checkAuthentication()
  throws UnsupportedConstraintException
    {
  if (clientCredential == null) {
      throw new UnsupportedConstraintException(
    "Client is not authenticated");
  } else if (clientCredential.isDestroyed()) {
      throw new UnsupportedConstraintException(
    "Private credentials are destroyed");
  } else if (System.currentTimeMillis() > credentialsValidUntil) {
      throw new UnsupportedConstraintException(
    "Certificates are no longer valid");
  }
  if (subjectIsReadOnly) {
      SecurityManager sm = System.getSecurityManager();
      if (sm != null) {
    sm.checkPermission(authenticationPermission);
      }
  } else {
      Subject subject = getSubject();
      X509Certificate cert = clientCredential.getCertificate();
      if (SubjectCredentials.getPrincipal(subject, cert) == null) {
    throw new UnsupportedConstraintException("Missing principal");
      }
      CertPath chain =
    SubjectCredentials.getCertificateChain(subject, cert);
      if (chain == null) {
    throw new UnsupportedConstraintException(
        "Missing public credentials");
      }
      X500PrivateCredential pc = getPrivateCredential(
    cert, authenticationPermission);
      if (pc == null) {
    throw new UnsupportedConstraintException(
        "Missing private credentials");
      } else if (!equalPrivateCredentials(clientCredential, pc)) {
    throw new UnsupportedConstraintException(
        "Wrong private credentials");
      }
  }
    }
View Full Code Here

TOP

Related Classes of net.jini.io.UnsupportedConstraintException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.