Package org.apache.abdera.protocol.server.context

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


     * 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

  }
 
  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

    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

  }
 
  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

  }
 
  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

    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

  }
 
  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

Related Classes of org.apache.abdera.protocol.server.context.StreamWriterResponseContext

Copyright © 2018 www.massapicom. 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.