Package freenet.clients.fcp

Source Code of freenet.clients.fcp.ExpectedMIME

package freenet.clients.fcp;

import freenet.node.Node;
import freenet.support.SimpleFieldSet;

public class ExpectedMIME extends FCPMessage {

  final String identifier;
  final boolean global;
  final String expectedMIME;
 
  ExpectedMIME(String identifier, boolean global, String expectedMIME) {
    this.identifier = identifier;
    this.global = global;
    this.expectedMIME = expectedMIME;
  }
 
  @Override
  public SimpleFieldSet getFieldSet() {
    SimpleFieldSet fs = new SimpleFieldSet(false);
    fs.putOverwrite("Identifier", identifier);
    fs.put("Global", global);
    fs.putOverwrite("Metadata.ContentType", expectedMIME);
    return fs;
  }

  @Override
  public String getName() {
    return "ExpectedMIME";
  }

  @Override
  public void run(FCPConnectionHandler handler, Node node)
      throws MessageInvalidException {
    // Not supported
  }

}
TOP

Related Classes of freenet.clients.fcp.ExpectedMIME

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.