Examples of StreamWriterResponseContext


Examples of org.apache.abdera.protocol.server.context.StreamWriterResponseContext

     */
    public static AbstractResponseContext createErrorResponse(Abdera abdera,
                                                              final int code,
                                                              final String message,
                                                              final Throwable t) {
        AbstractResponseContext rc = new StreamWriterResponseContext(abdera) {
            protected void writeTo(StreamWriter sw) throws IOException {
                Error.create(sw, code, message, t);
            }
        };
        rc.setStatus(code);
        rc.setStatusText(message);
        return rc;
    }
View Full Code Here

Examples of org.apache.abdera.protocol.server.context.StreamWriterResponseContext

     * Categories map to feed ids available on this server. This might be only
     * the feeds belonging to a server's "registered users" or all feeds cached
     * by a server or some logical place inbetween.
     */
    public ResponseContext getCategories(RequestContext request) {
        return new StreamWriterResponseContext(request.getAbdera()) {
            protected void writeTo(StreamWriter sw) throws IOException {
                sw.startDocument().startCategories(false);
                for (String id : persistence.getFeedIds(0, 100)) {
                    sw.writeCategory(id);
                }
View Full Code Here

Examples of org.apache.abdera.protocol.server.context.StreamWriterResponseContext

  }
 
  public ResponseContext getCategories(
    RequestContext request) {
      return
        new StreamWriterResponseContext(request.getAbdera()) {
          protected void writeTo(
            StreamWriter sw)
              throws IOException {
            sw.startDocument()
              .startCategories(false)
View Full Code Here

Examples of org.apache.abdera.protocol.server.context.StreamWriterResponseContext

    return buf.toString();
  }
 
  private ResponseContext getOpenSearchDescription(
    RequestContext request) {
      return new StreamWriterResponseContext(request.getAbdera()) {
        protected void writeTo(
          StreamWriter sw)
            throws IOException {
          sw.startDocument()
            .startElement("OpenSearchDescription", OSDNS)
View Full Code Here

Examples of org.apache.abdera.protocol.server.context.StreamWriterResponseContext

  }
 
  protected ResponseContext getServiceDocument(
    final RequestContext request) {
      return
        new StreamWriterResponseContext(request.getAbdera()) {
          protected void writeTo(
            StreamWriter sw)
              throws IOException {
            sw.startDocument()
              .startService();
View Full Code Here

Examples of org.apache.abdera.protocol.server.context.StreamWriterResponseContext

  }
 
  public ResponseContext getCategories(
    RequestContext request) {
      return
        new StreamWriterResponseContext(request.getAbdera()) {
          protected void writeTo(
            StreamWriter sw)
              throws IOException {
            sw.startDocument()
              .startCategories(false)
View Full Code Here

Examples of org.apache.abdera.protocol.server.context.StreamWriterResponseContext

    Abdera abdera,
    final int code,
    final String message,
    final Throwable t) {
      AbstractResponseContext rc =
        new StreamWriterResponseContext(abdera) {
          protected void writeTo(StreamWriter sw)
            throws IOException {
            Error.create(sw, code, message, t);
          }
        };
      rc.setStatus(code);
      rc.setStatusText(message);
      return rc;
  }
View Full Code Here

Examples of org.apache.abdera.protocol.server.context.StreamWriterResponseContext

  }
 
  public ResponseContext getCategories(
    RequestContext request) {
      return
        new StreamWriterResponseContext(request.getAbdera()) {
          protected void writeTo(
            StreamWriter sw)
              throws IOException {
            sw.startDocument()
              .startCategories(false)
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.