Examples of addField()


Examples of org.graylog2.plugin.Message.addField()

    @Test
    public void testBasicExtractionWithSpecialRegexChar() throws Exception {
        Message msg = new Message("The short message", "TestUnit", Tools.iso8601());

        msg.addField("somefield", "foo.bar.baz");

        SplitAndIndexExtractor x = new SplitAndIndexExtractor(metricRegistry, "foo", "foo", 0, Extractor.CursorStrategy.COPY, "somefield", "our_result", config(".", 2), "foo", noConverters(), Extractor.ConditionType.NONE, null);
        x.runExtractor(msg);

        assertNotNull(msg.getField("our_result"));
View Full Code Here

Examples of org.graylog2.plugin.configuration.ConfigurationRequest.addField()

    }

    @Override
    public ConfigurationRequest getRequestedConfiguration() {
        final ConfigurationRequest configurationRequest = new ConfigurationRequest();
        configurationRequest.addField(new TextField(CK_HOSTNAME, "Destination host", "", "This is the hostname of the destination", ConfigurationField.Optional.NOT_OPTIONAL));
        configurationRequest.addField(new NumberField(CK_PORT, "Destination port", 12201, "This is the port of the destination", ConfigurationField.Optional.NOT_OPTIONAL));
        final Map<String, String> protocols = ImmutableMap.of(
                "TCP", "TCP",
                "UDP", "UDP");
        configurationRequest.addField(new DropdownField(CK_PROTOCOL, "Protocol", "TCP", protocols, "The protocol used to connect", ConfigurationField.Optional.OPTIONAL));
View Full Code Here

Examples of org.hxzon.netprotocol.quick.packet.QEthernetPacket.addField()

        if (QPacketConstants.EthernetType_Vlan.equalsIgnoreCase(ethernetTypeField.getValue())) {
            QVlanPacket vlanPacket = new QVlanPacket();
            vlanPacket.addField(QVlanPacket.fetchEthernetType(data, QPacketConstants.EthernetHeaderLen));
            ethernetPacket.setPayload(vlanPacket);
        }
        ethernetPacket.addField(ethernetTypeField);
        if (QPacketConstants.EthernetType_Goose == ethernetType) {
            QGoosePacket goosePacket = new QGoosePacket();
            goosePacket.addField(QGoosePacket.fetchAppId(data, ethernetHeaderLen));
            goosePacket.addField(QGoosePacket.fetchPduLen(data, ethernetHeaderLen));
            if (ethernetPacket.getPayload() == null) {
View Full Code Here

Examples of org.hxzon.netprotocol.quick.packet.QGoosePacket.addField()

            ethernetPacket.setPayload(vlanPacket);
        }
        ethernetPacket.addField(ethernetTypeField);
        if (QPacketConstants.EthernetType_Goose == ethernetType) {
            QGoosePacket goosePacket = new QGoosePacket();
            goosePacket.addField(QGoosePacket.fetchAppId(data, ethernetHeaderLen));
            goosePacket.addField(QGoosePacket.fetchPduLen(data, ethernetHeaderLen));
            if (ethernetPacket.getPayload() == null) {
                ethernetPacket.setPayload(goosePacket);
            } else {
                ethernetPacket.getPayload().setPayload(goosePacket);
View Full Code Here

Examples of org.hxzon.netprotocol.quick.packet.QSvPacket.addField()

            } else {
                ethernetPacket.getPayload().setPayload(goosePacket);
            }
        } else if (QPacketConstants.EthernetType_Smv == ethernetType) {
            QSvPacket smvPacket = new QSvPacket();
            smvPacket.addField(QSvPacket.fetchAppId(data, ethernetHeaderLen));
            smvPacket.addField(QSvPacket.fetchPduLen(data, ethernetHeaderLen));
            if (ethernetPacket.getPayload() == null) {
                ethernetPacket.setPayload(smvPacket);
            } else {
                ethernetPacket.getPayload().setPayload(smvPacket);
View Full Code Here

Examples of org.hxzon.netprotocol.quick.packet.QVlanPacket.addField()

        int ethernetType = PacketUtils.ethernetType(data);
        int ethernetHeaderLen = PacketUtils.ethernetHeaderLen(data);
        QProtocolStringField ethernetTypeField = QEthernetPacket.fetchEthernetType(data, 0);
        if (QPacketConstants.EthernetType_Vlan.equalsIgnoreCase(ethernetTypeField.getValue())) {
            QVlanPacket vlanPacket = new QVlanPacket();
            vlanPacket.addField(QVlanPacket.fetchEthernetType(data, QPacketConstants.EthernetHeaderLen));
            ethernetPacket.setPayload(vlanPacket);
        }
        ethernetPacket.addField(ethernetTypeField);
        if (QPacketConstants.EthernetType_Goose == ethernetType) {
            QGoosePacket goosePacket = new QGoosePacket();
View Full Code Here

Examples of org.jaudiotagger.tag.Tag.addField()

            if (song.getAlbumArtUrl() != null)
            {
                Artwork artwork = new Artwork();
                artwork.setBinaryData(Resources.toByteArray(song
                        .getAlbumArtUrlAsURI().toURL()));
                tag.addField(artwork);

                /*
                 * File imageFile = new File(new File(".") +
                 * System.getProperty("path.separator") + song.getId() + ".im");
                 * Files
 
View Full Code Here

Examples of org.jaudiotagger.tag.mp4.Mp4Tag.addField()

        mp4Tag.deleteField(Mp4FieldKey.GENRE_CUSTOM);
       
      for (int i = 0; i < genres.size(); i++) {
        String genre = genres.get(i);
          if (!Util.isEmpty(genre)) {
            mp4Tag.addField(FieldKey.GENRE, genre);
          }
        }
      }
    }
View Full Code Here

Examples of org.jboss.classfilewriter.ClassFile.addField()

        ctor.getCodeAttribute().invokespecial(superclass.getName(), "<init>", "()V");
        ctor.getCodeAttribute().returnInstruction();

        // Generate the method _ids(), declared as abstract in ObjectImpl
        final String[] ids = interfaceAnalysis.getAllTypeIds();
        asm.addField(Modifier.PRIVATE + Modifier.STATIC, ID_FIELD_NAME, String[].class);
        final CodeAttribute idMethod = asm.addMethod(Modifier.PUBLIC + Modifier.FINAL, "_ids", "[Ljava/lang/String;").getCodeAttribute();
        idMethod.getstatic(stubClassName, ID_FIELD_NAME, "[Ljava/lang/String;");
        idMethod.returnInstruction();

        // Generate the static initializer
View Full Code Here

Examples of org.jboss.errai.codegen.framework.meta.impl.build.BuildMetaClass.addField()

    }

    buildMetaClass.setParameterizedType(parameterizedType);

    for (MetaField field : clazz.getFields()) {
      buildMetaClass.addField(new BuildMetaField(buildMetaClass, EmptyStatement.INSTANCE,
              GenUtil.scopeOf(field), field.getType(), field.getName()));
    }

    for (MetaConstructor c : clazz.getConstructors()) {
      BuildMetaConstructor newConstructor = new BuildMetaConstructor(buildMetaClass, EmptyStatement.INSTANCE,
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.