All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.intel.jndn.utils.server.RepositoryServer Maven / Gradle / Ivy

Go to download

Collection of tools to simplify synchronous and asynchronous data transfer over the NDN network

There is a newer version: 1.1.1
Show newest version
/*
 * jndn-utils
 * Copyright (c) 2015, Intel Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU Lesser General Public License,
 * version 3, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
 * more details.
 */
package com.intel.jndn.utils.server;

import com.intel.jndn.utils.Server;
import java.io.IOException;
import net.named_data.jndn.Data;

/**
 * Defines the API for a {@link Server} producing {@link Data} packets and
 * storing them until they are requested; this server corresponds closely to use
 * cases such as: cache, file system, web server.
 *
 * @author Andrew Brown 
 */
public interface RepositoryServer extends Server {

  /**
   * Store a {@link Data} packet in the server's repository until requested.
   *
   * @param data the {@link Data} packet to store and serve
   * @throws IOException if the underlying server fails to store the packet
   */
  public void serve(Data data) throws IOException;
  
  /**
   * Clean up stale {@link Data} packets from the underlying content store.
   */
  public void cleanup();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy