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

## com.sun.management.oss
Interface Serializer

All Superinterfaces:
  java.io.Serializable

All Known Subinterfaces:
  XmlSerializer

All Known Implementing Classes:
  PmXmlSerializerImpl, PmXmlSerializerImpl

public interface Serializer
extends java.io.Serializable

Base interface for all Serializers. It defines generic methods for marshalling and unmarshalling a Java object.

See Also:
  `XmlSerializer`, `SerializerFactory`

Method Summary
`java.lang.String` | `getDefaultEncodingStyle()` Returns the default encoding that is the encoding style used by the Serializer when it is created.
`java.lang.String` | `getEncodingStyle()` Get the encoding style associated with this Serializer.
`java.lang.String[]` | `getSupportedEncodingStyles()` Get all the encoding styles supported by this Serializer.
`java.lang.String` | `getType()` Return the type of object that this Serializer can marshall and unmarshall from and to XML, for example `com.sun.management.oss.TroubleTicketValue`
`void` | `setEncodingStyle(java.lang.String encodingStyle)` Set the encoding style associated with this Serializer.

Method Detail

### getSupportedEncodingStyles

    public java.lang.String[] getSupportedEncodingStyles()

  Get all the encoding styles supported by this Serializer. This may return an empty array, in case no serializer is implemented.

  Returns:
    an array of EncodingStyle strings.

### getDefaultEncodingStyle

    public java.lang.String getDefaultEncodingStyle()

  Returns the default encoding that is the encoding style used by the Serializer when it is created. To set the encoding style to another value use `setEncodingStyle()`

  Returns:
    the default encoding style.

### setEncodingStyle

    public void setEncodingStyle(java.lang.String encodingStyle)
                          throws java.lang.IllegalArgumentException

  Set the encoding style associated with this Serializer.

  For example "http://java.sun.com/products/oss/xml" for the OSSJ XML Encoding Style defined in the OSSJ Design Guidelines.

  One of the items returned by `getSupportedEncodingStyles()` should be provided as parameter.

  Parameters:
    `encodingStyle` - the encodingStyle string.
  Throws:
    `java.lang.IllegalArgumentException` - if the provided encoding style is not valid or is not recognized by the Serializer.

### getEncodingStyle

    public java.lang.String getEncodingStyle()

  Get the encoding style associated with this Serializer.

  A Serializer is always created with a default encoding style.

  The default encoding style is provided by the value of the `OSS_DEFAULT_ENCODING_STYLE` found in the declaration of the specific serializer type `<Serializer Type>EncodingStyles` interface.

  Returns:
    the encoding style associated with this Serializer.

### getType

    public java.lang.String getType()

  Return the type of object that this Serializer can marshall and unmarshall from and to XML, for example `com.sun.management.oss.TroubleTicketValue`

  Returns:
    the type of object that this object can serialize.

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