Package javax.naming.ldap

Examples of javax.naming.ldap.InitialLdapContext.extendedOperation()


        server
                .setResponseSeq(new LdapMessage[] { new LdapMessage(
                        LdapASN1Constant.OP_EXTENDED_RESPONSE,
                        encodableResponse, null) });

        ExtendedResponse response = context
                .extendedOperation(new MockExtendedRequest());
        assertTrue(response instanceof MockExtendedResponse);
        assertEquals("It's my id", response.getID());
        assertEquals(4, response.getEncodedValue().length);
        assertEquals(0, response.getEncodedValue()[0]);
View Full Code Here


                .setResponseSeq(new LdapMessage[] { new LdapMessage(
                        LdapASN1Constant.OP_EXTENDED_RESPONSE,
                        encodableResponse, null) });

        try {
            context.extendedOperation(new MockExtendedRequest());
            fail("Should throw NamingException");
        } catch (NamingException e) {
            // expected
            assertEquals("exception", e.getMessage());
        }
View Full Code Here

        try {
          StartTlsResponse tls;

          InitialLdapContext result = new InitialLdapContext(fEnv, null);

          tls = (StartTlsResponse) result.extendedOperation(
              new StartTlsRequest());
          tls.setHostnameVerifier(fVerifier);
          try
          {
            tls.negotiate(new TrustedSocketFactory(fTrustManager,fKeyManager));
View Full Code Here

        LdapContext ctx = new InitialLdapContext( env, null );
        if ( isDebugEnabled() )
        {
            System.out.println( "Connection to the server established.\n" + "Sending extended request ... " );
        }
        ctx.extendedOperation( JndiUtils.toJndiExtendedRequest( new LaunchDiagnosticUiRequest( 3 ) ) );
        ctx.close();
    }


    private void processOptions( CommandLine cmd )
View Full Code Here

            Thread t = new Thread( new Ticker() );
            t.start();
        }
        try
        {
            ctx.extendedOperation( JndiUtils
                .toJndiExtendedRequest( new GracefulShutdownRequest( 0, timeOffline, delay ) ) );
            isSuccess = true;
        }
        catch ( Throwable t )
        {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.