Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.logging.log4j.message
Class StructuredDataId

    java.lang.Object
      org.apache.logging.log4j.message.StructuredDataId

All Implemented Interfaces:
  Serializable

    public class StructuredDataId

extends Object
implements Serializable

The StructuredData identifier.

See Also:
  Serialized Form

Field Summary
`static StructuredDataId` | `META` RFC 5424 Meta.
`static StructuredDataId` | `ORIGIN` RFC 5424 Origin.
`static int` | `RESERVED` Reserved enterprise number.
`static StructuredDataId` | `TIME_QUALITY` RFC 5424 Time Quality.

Constructor Summary
`` | `StructuredDataId(String name, int enterpriseNumber, String[] required, String[] optional)` A Constructor that helps conformance to RFC 5424.
`protected` | `StructuredDataId(String name, String[] required, String[] optional)`

Method Summary
`int` | `getEnterpriseNumber()` Returns the enterprise number.
`String` | `getName()` Returns the StructuredDataId name.
`String[]` | `getOptional()` Returns a list of optional keys.
`String[]` | `getRequired()` Returns a list of required keys.
`boolean` | `isReserved()` Indicates if the id is reserved.
`StructuredDataId` | `makeId(String defaultId, int enterpriseNumber)` Creates an id based on the current id.
`StructuredDataId` | `makeId(StructuredDataId id)` Creates an id using another id to supply default values.
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### TIME_QUALITY

    public static final StructuredDataId TIME_QUALITY

  RFC 5424 Time Quality.

### ORIGIN

    public static final StructuredDataId ORIGIN

  RFC 5424 Origin.

### META

    public static final StructuredDataId META

  RFC 5424 Meta.

### RESERVED

    public static final int RESERVED

  Reserved enterprise number.

  See Also:
    Constant Field Values

Constructor Detail

### StructuredDataId

    protected StructuredDataId(String name,
                               String[] required,
                               String[] optional)

### StructuredDataId

    public StructuredDataId(String name,
                            int enterpriseNumber,
                            String[] required,
                            String[] optional)

  A Constructor that helps conformance to RFC 5424.

  Parameters:
    `name` - The name portion of the id.
    `enterpriseNumber` - The enterprise number.
    `required` - The list of keys that are required for this id.
    `optional` - The list of keys that are optional for this id.

Method Detail

### makeId

    public StructuredDataId makeId(StructuredDataId id)

  Creates an id using another id to supply default values.

  Parameters:
    `id` - The original StructuredDataId.
  Returns:
    the new StructuredDataId.

### makeId

    public StructuredDataId makeId(String defaultId,
                                   int enterpriseNumber)

  Creates an id based on the current id.

  Parameters:
    `defaultId` - The default id to use if this StructuredDataId doesn't have a name.
    `enterpriseNumber` - The enterprise number.
  Returns:
    a StructuredDataId.

### getRequired

    public String[] getRequired()

  Returns a list of required keys.

  Returns:
    a List of required keys or null if none have been provided.

### getOptional

    public String[] getOptional()

  Returns a list of optional keys.

  Returns:
    a List of optional keys or null if none have been provided.

### getName

    public String getName()

  Returns the StructuredDataId name.

  Returns:
    the StructuredDataId name.

### getEnterpriseNumber

    public int getEnterpriseNumber()

  Returns the enterprise number.

  Returns:
    the enterprise number.

### isReserved

    public boolean isReserved()

  Indicates if the id is reserved.

  Returns:
    true if the id uses the reserved enterprise number, false otherwise.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.