Examples of encodeMessage()


Examples of com.dianping.cat.message.spi.codec.PlainTextMessageCodec.encodeMessage()

  @Override
  public String toString() {
    PlainTextMessageCodec codec = new PlainTextMessageCodec();
    ChannelBuffer buf = ChannelBuffers.dynamicBuffer();

    codec.encodeMessage(this, buf);
    codec.reset();
    return buf.toString(Charset.forName("utf-8"));
  }
}
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpMessage.encodeMessage()

        // Try to transform the response SnmpMessage into response packet.
        // NOTE: we overwrite the request packet.
        //
        if (respMsg != null) {
            try {
                reqPacket.setLength(respMsg.encodeMessage(reqPacket.getData())) ;
                respPacket = reqPacket ;
            }
            catch(SnmpTooBigException x) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpMessage.encodeMessage()

                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
                        "makeResponsePacket", "response message is too big");
                }
                try {
                    respMsg = newTooBigMessage(reqMsg) ;
                    reqPacket.setLength(respMsg.encodeMessage(reqPacket.getData())) ;
                    respPacket = reqPacket ;
                }
                catch(SnmpTooBigException xx) {
                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpMessage.encodeMessage()

                // FIXME: may be it's not the best behaviour ?
            }

            int maxPktSize = adaptor.getBufferSize().intValue();
            byte[] encoding = new byte[maxPktSize];
            int encodingLength = msg.encodeMessage(encoding);
     
            if (isTraceOn()) {
                trace("sendPdu", "Dump : \n" + msg.printMessage());
            }
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpMessage.encodeMessage()

                // FIXME: may be it's not the best behaviour ?
            }

            int maxPktSize = adaptor.getBufferSize().intValue();
            byte[] encoding = new byte[maxPktSize];
            int encodingLength = msg.encodeMessage(encoding);

            if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINER)) {
                SNMP_ADAPTOR_LOGGER.logp(Level.FINER, SnmpInformRequest.class.getName(),
                    "sendPdu", "Dump : \n" + msg.printMessage());
            }
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpMessage.encodeMessage()

        // Try to transform the response SnmpMessage into response packet.
        // NOTE: we overwrite the request packet.
        //
        if (respMsg != null) {
            try {
                reqPacket.setLength(respMsg.encodeMessage(reqPacket.getData())) ;
                respPacket = reqPacket ;
            }
            catch(SnmpTooBigException x) {
                if (isDebugOn()) {
                    debug("makeResponsePacket", "response message is too big");
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpMessage.encodeMessage()

                if (isDebugOn()) {
                    debug("makeResponsePacket", "response message is too big");
                }
                try {
                    respMsg = newTooBigMessage(reqMsg) ;
                    reqPacket.setLength(respMsg.encodeMessage(reqPacket.getData())) ;
                    respPacket = reqPacket ;
                }
                catch(SnmpTooBigException xx) {
                    if (isDebugOn()) {
                        debug("makeResponsePacket", "'too big' is 'too big' !!!");
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpMessage.encodeMessage()

        // Try to transform the response SnmpMessage into response packet.
        // NOTE: we overwrite the request packet.
        //
        if (respMsg != null) {
            try {
                reqPacket.setLength(respMsg.encodeMessage(reqPacket.getData())) ;
                respPacket = reqPacket ;
            }
            catch(SnmpTooBigException x) {
                if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
View Full Code Here

Examples of com.sun.jmx.snmp.SnmpMessage.encodeMessage()

                    SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
                        "makeResponsePacket", "response message is too big");
                }
                try {
                    respMsg = newTooBigMessage(reqMsg) ;
                    reqPacket.setLength(respMsg.encodeMessage(reqPacket.getData())) ;
                    respPacket = reqPacket ;
                }
                catch(SnmpTooBigException xx) {
                    if (SNMP_ADAPTOR_LOGGER.isLoggable(Level.FINEST)) {
                        SNMP_ADAPTOR_LOGGER.logp(Level.FINEST, dbgTag,
View Full Code Here

Examples of org.apache.directory.api.ldap.codec.api.LdapEncoder.encodeMessage()

            // Setup the ASN1 Encoder and Decoder
            LdapDecoder decoder = new LdapDecoder();

            // Send encoded request to server
            LdapEncoder encoder = new LdapEncoder( getLdapServer().getDirectoryService().getLdapCodecService() );
            ByteBuffer bb = encoder.encodeMessage( request );

            bb.flip();

            _output_.write( bb.array() );
            _output_.flush();
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.