Payload$Outbound.addPart
Code IndexAdd Codota to your IDE (free)

Best code snippets using org.glassfish.api.admin.Payload$Outbound.addPart(Showing top 9 results out of 315)

  • Common ways to obtain Payload$Outbound
private void myMethod () {
Payload$Outbound p =
  • AdminCommandContext adminCommandContext;adminCommandContext.getOutboundPayload()
  • AI code suggestions by Codota
}
origin: javaee/glassfish

private void loadOutbound(Outbound outbound, File outboundFile) throws IOException {
  if (outbound == null || !outboundFile.exists()) {
    return;
  }
  Inbound outboundSource = loadInbound(outboundFile);
  Iterator<Part> parts = outboundSource.parts();
  File topDir = createTempDir("checkpoint", "");
  topDir.deleteOnExit();
  while (parts.hasNext()) {
    Part part = parts.next();
    File sourceFile = File.createTempFile("source", "", topDir);
    FileUtils.copy(part.getInputStream(), new FileOutputStream(sourceFile), Long.MAX_VALUE);
    outbound.addPart(part.getContentType(), part.getName(), part.getProperties(), new FileInputStream(sourceFile));
  }
  outbound.resetDirty();
}
origin: fish.payara.extras/payara-embedded-all

final Properties reportProps = new Properties();
reportProps.setProperty("data-request-type", "report");
outboundPayload.addPart(0, actionReport.getContentType(), "report", reportProps, bais);
origin: javaee/glassfish

final Properties reportProps = new Properties();
reportProps.setProperty("data-request-type", "report");
outboundPayload.addPart(0, report.getContentType(), "report",
    reportProps, bais);
res.setContentType(outboundPayload.getContentType());
origin: fish.payara.extras/payara-embedded-all

final Properties reportProps = new Properties();
reportProps.setProperty("data-request-type", "report");
outboundPayload.addPart(0, report.getContentType(), "report",
    reportProps, bais);
res.setContentType(outboundPayload.getContentType());
origin: fish.payara.extras/payara-embedded-all

private void loadOutbound(Outbound outbound, File outboundFile) throws IOException {
  if (outbound == null || !outboundFile.exists()) {
    return;
  }
  Inbound outboundSource = loadInbound(outboundFile);
  Iterator<Part> parts = outboundSource.parts();
  File topDir = createTempDir("checkpoint", "");
  topDir.deleteOnExit();
  while (parts.hasNext()) {
    Part part = parts.next();
    File sourceFile = File.createTempFile("source", "", topDir);
    FileUtils.copy(part.getInputStream(), new FileOutputStream(sourceFile), Long.MAX_VALUE);
    outbound.addPart(part.getContentType(), part.getName(), part.getProperties(), new FileInputStream(sourceFile));
  }
  outbound.resetDirty();
}
origin: org.glassfish.main.core/kernel

private void loadOutbound(Outbound outbound, File outboundFile) throws IOException {
  if (outbound == null || !outboundFile.exists()) {
    return;
  }
  Inbound outboundSource = loadInbound(outboundFile);
  Iterator<Part> parts = outboundSource.parts();
  File topDir = createTempDir("checkpoint", "");
  topDir.deleteOnExit();
  while (parts.hasNext()) {
    Part part = parts.next();
    File sourceFile = File.createTempFile("source", "", topDir);
    FileUtils.copy(part.getInputStream(), new FileOutputStream(sourceFile), Long.MAX_VALUE);
    outbound.addPart(part.getContentType(), part.getName(), part.getProperties(), new FileInputStream(sourceFile));
  }
  outbound.resetDirty();
}
origin: payara/Payara

final Properties reportProps = new Properties();
reportProps.setProperty("data-request-type", "report");
outboundPayload.addPart(0, actionReport.getContentType(), "report", reportProps, bais);
origin: org.glassfish.main.admin/admin-cli

final Properties reportProps = new Properties();
reportProps.setProperty("data-request-type", "report");
outboundPayload.addPart(0, actionReport.getContentType(), "report", reportProps, bais);
origin: org.glassfish.main.core/kernel

final Properties reportProps = new Properties();
reportProps.setProperty("data-request-type", "report");
outboundPayload.addPart(0, report.getContentType(), "report",
    reportProps, bais);
res.setContentType(outboundPayload.getContentType());
org.glassfish.api.adminPayload$OutboundaddPart

Javadoc

Adds a part of the specified content type, name, and content at a specified position in the parts of the payload.

Popular methods of Payload$Outbound

  • attachFile
    Adds a part to the payload of the given content type from the specified file. The name assigned to t
  • writeTo
    Writes the parts already added to the payload to the specified OutputStream.
  • parts
    Returns the parts from the outbound payload.
  • size
    Count of attached parts
  • getContentType
    Returns the content type of the payload, determined by whether there are multiple parts and, if not,
  • isDirty
    Indicates whether Payload was modified since dirty flag was reset.
  • resetDirty
    Resets Payload dirty flag, indicating whether Payload was modified.
  • requestFileRemoval
    Adds a part to the payload that represents a request to remove the specified file, presumably previo
  • requestFileReplacement
    Adds a part to the payload to request that the specified file be replaced. If the fileURI translates

Popular classes and methods

  • setScale (BigDecimal)
    Returns a new BigDecimal instance with the specified scale. If the new scale is greater than the old
  • notifyDataSetChanged (ArrayAdapter)
  • Component (java.awt)
  • Font (java.awt)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)