Examples of Codec


Examples of org.apache.lucene.codecs.Codec

    IndexWriterConfig conf = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random()));

    // Sometimes swap in codec that impls ord():
    if (random().nextInt(10) == 7) {
      Codec codec = _TestUtil.alwaysPostingsFormat(PostingsFormat.forName("Lucene41WithOrds"));
      conf.setCodec(codec);
    }
   
    final RandomIndexWriter w = new RandomIndexWriter(random(), dir, conf);
View Full Code Here

Examples of org.codehaus.preon.Codec

        ByteAligningDecorator decorator = new ByteAligningDecorator();
        expect(codec.decode(buffer, resolver, builder)).andReturn(new Object());
        expect(buffer.getBitPos()).andReturn(12L).anyTimes();
        buffer.setBitPos(16L);
        replay(codec, metadata, buffer, resolver, context);
        Codec decorated = decorator.decorate(codec, metadata, Test1.class, context);
        assertNotSame(decorated, codec);
        decorated.decode(buffer, resolver, builder);
        verify(codec, metadata, buffer, resolver, context);
    }
View Full Code Here

Examples of org.infinispan.cli.interpreter.codec.Codec

      return codec;
   }

   @Override
   public Codec getCodec(String codec) throws CodecException {
      Codec c = codecRegistry.getCodec(codec);
      if (c == null) {
         throw log.noSuchCodec(codec);
      } else {
         return c;
      }
View Full Code Here

Examples of org.infinispan.client.hotrod.impl.protocol.Codec

*/
@Test (groups = "unit", testName = "client.hotrod.TransportObjectFactoryTest")
public class TransportObjectFactoryTest {

   public void testValidate() {
      Codec codec = mock(Codec.class);
      TransportObjectFactory objectFactory = new TransportObjectFactory(codec, null,
                                                                        new AtomicInteger(), false);
      doThrow(new TransportException("induced!", null))
            .when(codec).writeHeader(any(Transport.class), any(HeaderParams.class));

View Full Code Here

Examples of org.omg.IOP.Codec

    public void pre_init(ORBInitInfo info) {
        Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value, (byte)1,(byte) 0);
        CodecFactory codecFactory = info.codec_factory();
        try {
            Codec codec = codecFactory.create_codec(encoding);
            RMIInterceptor rmiInterceptor = new RMIInterceptor(codec);
            info.add_ior_interceptor(rmiInterceptor);
        } catch (UserException e) {
            logger.warning("cannot register RMI Interceptor" + e);
        }
View Full Code Here

Examples of org.omg.IOP.Codec

        try {
            // use CDR encapsulation with GIOP 1.0 encoding.
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);

            // add IOR interceptor for CSIv2.
            info.add_ior_interceptor(new CSIv2IORInterceptor(codec));

            // register CSIv2-related policy factories.
View Full Code Here

Examples of org.omg.IOP.Codec

        try {
            // Use CDR encapsulation with GIOP 1.0 encoding
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);

            // Get a reference to the PICurrent
            org.omg.CORBA.Object obj =
                    info.resolve_initial_references("PICurrent");
            org.omg.PortableInterceptor.Current piCurrent =
View Full Code Here

Examples of org.omg.IOP.Codec

        try {
            // Use CDR encapsulation with GIOP 1.0 encoding
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);
            info.add_ior_interceptor(new TxIORInterceptor(codec));
        } catch (Exception e) {
            throw JacORBMessages.MESSAGES.unexpectedException(e);
        }
    }
View Full Code Here

Examples of org.omg.IOP.Codec

        try {
            // use CDR encapsulations with GIOP 1.0 encoding.
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);

            // create and register client interceptor.
            SASClientIdentityInterceptor clientInterceptor = new SASClientIdentityInterceptor(codec);
            info.add_client_request_interceptor(clientInterceptor);

View Full Code Here

Examples of org.omg.IOP.Codec

            // Use CDR encapsulations with GIOP 1.0 encoding.
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);

            // Create and register client interceptor.
            obj = info.resolve_initial_references("SASCurrent");
            SASCurrentImpl sasCurrentImpl = (SASCurrentImpl) obj;
            SASClientInterceptor clientInterceptor = new SASClientInterceptor(codec);
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.