Class EndpointDescriptionWriter


  • public class EndpointDescriptionWriter
    extends java.lang.Object
    Endpoint description writer class for writing EndpointDescriptions 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.
    • Field Detail

      • indent

        protected java.lang.String indent
      • xmlNames

        protected java.util.List<java.lang.String> xmlNames
    • Constructor Detail

      • EndpointDescriptionWriter

        public EndpointDescriptionWriter()
      • EndpointDescriptionWriter

        public EndpointDescriptionWriter​(java.util.List<java.lang.String> xmlNames)
    • Method Detail

      • writeEndpointDescription

        public java.io.Writer writeEndpointDescription​(EndpointDescription endpointDescription)
                                                throws java.io.IOException
        Parameters:
        endpointDescription - the endpoint description to write
        Returns:
        Writer the writer used
        Throws:
        java.io.IOException - if endpoint descriptino cannot be written
        Since:
        4.2
      • writeEndpointDescriptions

        public java.io.Writer writeEndpointDescriptions​(EndpointDescription[] endpointDescriptions)
                                                 throws java.io.IOException
        Parameters:
        endpointDescriptions - the endpoint descriptions to write
        Returns:
        Writer used to write descriptions
        Throws:
        java.io.IOException - if problem writing
        Since:
        4.2
      • writeEndpointDescription

        public void writeEndpointDescription​(java.io.Writer writer,
                                             EndpointDescription endpointDescription)
                                      throws java.io.IOException
        Parameters:
        writer - the writer to use
        endpointDescription - the endpointDescription to write
        Throws:
        java.io.IOException - thrown if some problem writing
        Since:
        4.2
      • writeEndpointDescriptions

        public void writeEndpointDescriptions​(java.io.Writer writer,
                                              EndpointDescription[] endpointDescriptions)
                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • writeEndpointDescription

        protected void writeEndpointDescription​(int indentLevel,
                                                java.io.Writer writer,
                                                EndpointDescription endpointDescription)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • writeProperties

        protected void writeProperties​(int indentLevel,
                                       java.io.Writer writer,
                                       EndpointDescription endpointDescription)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • writeProperty

        protected void writeProperty​(int indentLevel,
                                     java.io.Writer writer,
                                     java.lang.String name,
                                     java.lang.Object value)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • writeUnknownProperty

        protected void writeUnknownProperty​(int indentLevel,
                                            java.io.Writer writer,
                                            java.lang.String name,
                                            java.lang.Object value)
      • writeValueProperty

        protected void writeValueProperty​(int indentLevel,
                                          java.lang.String name,
                                          java.lang.String valueType,
                                          java.lang.Object value,
                                          java.io.Writer writer)
                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • getValueType

        protected java.lang.String getValueType​(java.lang.Object value)
      • newLine

        protected java.io.Writer newLine​(java.io.Writer writer)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • indent

        protected java.io.Writer indent​(int indentLevel,
                                        java.io.Writer writer)
                                 throws java.io.IOException
        Throws:
        java.io.IOException