org.eclipse.ecf.osgi.services.remoteserviceadmin

## Class EndpointDescriptionWriter

- java.lang.Object
- - org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescriptionWriter

    public class EndpointDescriptionWriter
    extends Object

Endpoint description writer class for writing `EndpointDescription`s to the OSGi 4.2 Remote Service Admin Endpoint Description Extender Format (section 122.8 of OSGi 4.2 enterprise specification). This class may be used or extended to write `EndpointDescription` instances to the format specified by OSGi 4.2 section 122.8.

### Nested Class Summary

Nested Classes
`protected class` `EndpointDescriptionWriter.ArrayProperty`
`protected class` `EndpointDescriptionWriter.ComplexProperty`
`protected class` `EndpointDescriptionWriter.ListProperty`
`protected class` `EndpointDescriptionWriter.MultiValueProperty`
`protected class` `EndpointDescriptionWriter.SetProperty`
`protected class` `EndpointDescriptionWriter.XmlProperty`

### Field Summary

Fields
`protected String` `indent`
`protected List<String>` `xmlNames`

### Constructor Summary

Constructors
Constructor and Description
`EndpointDescriptionWriter()`
`EndpointDescriptionWriter(List<String> xmlNames)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected EndpointDescriptionWriter.ComplexProperty` `getComplexProperty(String name, Object value)`
`protected EndpointDescriptionWriter.MultiValueProperty` `getMultiValueProperty(String key, Object value)`
`protected String` `getValueType(Object value)`
`protected EndpointDescriptionWriter.XmlProperty` `getXmlProperty(String name, Object value)`
`protected Writer` `indent(int indentLevel, Writer writer)`
`protected Writer` `newLine(Writer writer)`
`Writer` `writeEndpointDescription(EndpointDescription endpointDescription)`
`protected void` `writeEndpointDescription(int indentLevel, Writer writer, EndpointDescription endpointDescription)`
`void` `writeEndpointDescription(Writer writer, EndpointDescription endpointDescription)`
`Writer` `writeEndpointDescriptions(EndpointDescription[] endpointDescriptions)`
`void` `writeEndpointDescriptions(Writer writer, EndpointDescription[] endpointDescriptions)`
`protected void` `writeProperties(int indentLevel, Writer writer, EndpointDescription endpointDescription)`
`protected void` `writeProperty(int indentLevel, Writer writer, String name, Object value)`
`protected void` `writeUnknownProperty(int indentLevel, Writer writer, String name, Object value)`
`protected void` `writeValueProperty(int indentLevel, String name, String valueType, Object value, Writer writer)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### indent

    protected String indent

#### xmlNames

    protected List<String> xmlNames

### Constructor Detail

#### EndpointDescriptionWriter

    public EndpointDescriptionWriter()

#### EndpointDescriptionWriter

    public EndpointDescriptionWriter(List<String> xmlNames)

### Method Detail

#### writeEndpointDescription

    public Writer writeEndpointDescription(EndpointDescription endpointDescription)
                                    throws IOException

Parameters:
  `endpointDescription` - the endpoint description to write
Returns:
  Writer the writer used
Throws:
  `IOException` - if endpoint descriptino cannot be written
Since:
  4.2

#### writeEndpointDescriptions

    public Writer writeEndpointDescriptions(EndpointDescription[] endpointDescriptions)
                                     throws IOException

Parameters:
  `endpointDescriptions` - the endpoint descriptions to write
Returns:
  Writer used to write descriptions
Throws:
  `IOException` - if problem writing
Since:
  4.2

#### writeEndpointDescription

    public void writeEndpointDescription(Writer writer,
                                         EndpointDescription endpointDescription)
                                  throws IOException

Parameters:
  `writer` - the writer to use
  `endpointDescription` - the endpointDescription to write
Throws:
  `IOException` - thrown if some problem writing
Since:
  4.2

#### writeEndpointDescriptions

    public void writeEndpointDescriptions(Writer writer,
                                          EndpointDescription[] endpointDescriptions)
                                   throws IOException

Throws:
  `IOException`

#### writeEndpointDescription

    protected void writeEndpointDescription(int indentLevel,
                                            Writer writer,
                                            EndpointDescription endpointDescription)
                                     throws IOException

Throws:
  `IOException`

#### writeProperties

    protected void writeProperties(int indentLevel,
                                   Writer writer,
                                   EndpointDescription endpointDescription)
                            throws IOException

Throws:
  `IOException`

#### writeProperty

    protected void writeProperty(int indentLevel,
                                 Writer writer,
                                 String name,
                                 Object value)
                          throws IOException

Throws:
  `IOException`

#### writeUnknownProperty

    protected void writeUnknownProperty(int indentLevel,
                                        Writer writer,
                                        String name,
                                        Object value)

#### getComplexProperty

    protected EndpointDescriptionWriter.ComplexProperty getComplexProperty(String name,
                                                                           Object value)

#### getXmlProperty

    protected EndpointDescriptionWriter.XmlProperty getXmlProperty(String name,
                                                                   Object value)

#### writeValueProperty

    protected void writeValueProperty(int indentLevel,
                                      String name,
                                      String valueType,
                                      Object value,
                                      Writer writer)
                               throws IOException

Throws:
  `IOException`

#### getMultiValueProperty

    protected EndpointDescriptionWriter.MultiValueProperty getMultiValueProperty(String key,
                                                                                 Object value)

#### getValueType

    protected String getValueType(Object value)

#### newLine

    protected Writer newLine(Writer writer)
                      throws IOException

Throws:
  `IOException`

#### indent

    protected Writer indent(int indentLevel,
                            Writer writer)
                     throws IOException

Throws:
  `IOException`