Tabnine Logo
MessagingException.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
javax.mail.MessagingException
constructor

Best Java code snippets using javax.mail.MessagingException.<init> (Showing top 20 results out of 918)

Refine searchRefine arrow

  • ConnectionException.getMessage
  • ProtocolException.getMessage
  • FolderClosedException.<init>
origin: camunda/camunda-bpm-platform

public Object doOptionalCommand(String err, ProtocolCommand cmd)
      throws MessagingException {
try {
  return doProtocolCommand(cmd);
} catch (BadCommandException bex) {
  throw new MessagingException(err, bex);
} catch (ConnectionException cex) {
    // Oops, the store or folder died on us.
    throwClosedException(cex);
} catch (ProtocolException pex) {
  throw new MessagingException(pex.getMessage(), pex);
}
return null;
}
origin: camunda/camunda-bpm-platform

protected void checkRange(int msgno) throws MessagingException {
if (msgno < 1) // message-numbers start at 1
  throw new IndexOutOfBoundsException("message number < 1");
if (msgno <= total)
  return;
// Out of range, let's ping the server and see if
// the server has more messages for us.
synchronized(messageCacheLock) { // Acquire lock
  try {
  keepConnectionAlive(false);
  } catch (ConnectionException cex) {
  // Oops, lost connection
  throw new FolderClosedException(this, cex.getMessage());
  } catch (ProtocolException pex) { 
  throw new MessagingException(pex.getMessage(), pex);
  }
} // Release lock
if (msgno > total) // Still out of range ? Throw up ...
  throw new IndexOutOfBoundsException(msgno + " > " + total);
}
origin: camunda/camunda-bpm-platform

/**
 * Set the quotas for the quota root specified in the quota argument.
 * Typically this will be one of the quota roots obtained from the
 * <code>getQuota</code> method, but it need not be.
 *
 * @param    quota    the quota to set
 * @exception MessagingException    if the server doesn't support the
 *                    QUOTA extension
 */
public synchronized void setQuota(Quota quota) throws MessagingException {
checkConnected();
  IMAPProtocol p = null;
try {
  p = getStoreProtocol();
  p.setQuota(quota);
} catch (BadCommandException bex) {
  throw new MessagingException("QUOTA not supported", bex);
} catch (ConnectionException cex) {
  throw new StoreClosedException(this, cex.getMessage());
} catch (ProtocolException pex) {
  throw new MessagingException(pex.getMessage(), pex);
} finally {
  releaseStoreProtocol(p);
}
}
origin: camunda/camunda-bpm-platform

/**
 * Return the unique ID string for this message, or null if
 * not available.  Uses the POP3 UIDL command.
 *
 * @param    msg    the message
 * @return          unique ID string
 * @exception    MessagingException for failures
 */
public synchronized String getUID(Message msg) throws MessagingException {
checkOpen();
if (!(msg instanceof POP3Message))
  throw new MessagingException("message is not a POP3Message");
POP3Message m = (POP3Message)msg;
try {
  if (!store.supportsUidl)
  return null;
  if (m.uid == POP3Message.UNKNOWN)
  m.uid = port.uidl(m.getMessageNumber());
  return m.uid;
} catch (EOFException eex) {
  close(false);
  throw new FolderClosedException(this, eex.toString());
} catch (IOException ex) {
  throw new MessagingException("error getting UIDL", ex);
}
}
origin: com.sun.mail/javax.mail

protected void checkRange(int msgno) throws MessagingException {
if (msgno < 1) // message-numbers start at 1
  throw new IndexOutOfBoundsException("message number < 1");
if (msgno <= total)
  return;
// Out of range, let's ping the server and see if
// the server has more messages for us.
synchronized(messageCacheLock) { // Acquire lock
  try {
  keepConnectionAlive(false);
  } catch (ConnectionException cex) {
  // Oops, lost connection
  throw new FolderClosedException(this, cex.getMessage());
  } catch (ProtocolException pex) { 
  throw new MessagingException(pex.getMessage(), pex);
  }
} // Release lock
if (msgno > total) // Still out of range ? Throw up ...
  throw new IndexOutOfBoundsException(msgno + " > " + total);
}
origin: com.sun.mail/javax.mail

/**
 * Set the quotas for the quota root specified in the quota argument.
 * Typically this will be one of the quota roots obtained from the
 * <code>getQuota</code> method, but it need not be.
 *
 * @param    quota    the quota to set
 * @exception MessagingException    if the server doesn't support the
 *                    QUOTA extension
 */
@Override
public synchronized void setQuota(Quota quota) throws MessagingException {
checkConnected();
  IMAPProtocol p = null;
try {
  p = getStoreProtocol();
  p.setQuota(quota);
} catch (BadCommandException bex) {
  throw new MessagingException("QUOTA not supported", bex);
} catch (ConnectionException cex) {
  throw new StoreClosedException(this, cex.getMessage());
} catch (ProtocolException pex) {
  throw new MessagingException(pex.getMessage(), pex);
} finally {
  releaseStoreProtocol(p);
}
}
origin: com.sun.mail/javax.mail

/**
 * Return the unique ID string for this message, or null if
 * not available.  Uses the POP3 UIDL command.
 *
 * @param    msg    the message
 * @return          unique ID string
 * @exception    MessagingException for failures
 */
public synchronized String getUID(Message msg) throws MessagingException {
checkOpen();
if (!(msg instanceof POP3Message))
  throw new MessagingException("message is not a POP3Message");
POP3Message m = (POP3Message)msg;
try {
  if (!store.supportsUidl)
  return null;
  if (m.uid == POP3Message.UNKNOWN)
  m.uid = port.uidl(m.getMessageNumber());
  return m.uid;
} catch (EOFException eex) {
  close(false);
  throw new FolderClosedException(this, eex.toString());
} catch (IOException ex) {
  throw new MessagingException("error getting UIDL", ex);
}
}
origin: com.sun.mail/javax.mail

public Object doOptionalCommand(String err, ProtocolCommand cmd)
      throws MessagingException {
try {
  return doProtocolCommand(cmd);
} catch (BadCommandException bex) {
  throw new MessagingException(err, bex);
} catch (ConnectionException cex) {
    // Oops, the store or folder died on us.
    throwClosedException(cex);
} catch (ProtocolException pex) {
  throw new MessagingException(pex.getMessage(), pex);
}
return null;
}
origin: camunda/camunda-bpm-platform

  throw new FolderClosedException(this, cex.getMessage());
} catch (ProtocolException pex) {
  throw new MessagingException(pex.getMessage(), pex);
origin: camunda/camunda-bpm-platform

  serverParams = p.id(clientParams);
} catch (BadCommandException bex) {
  throw new MessagingException("ID not supported", bex);
} catch (ConnectionException cex) {
  throw new StoreClosedException(this, cex.getMessage());
} catch (ProtocolException pex) {
  throw new MessagingException(pex.getMessage(), pex);
} finally {
  releaseStoreProtocol(p);
origin: camunda/camunda-bpm-platform

/**
 * Fetch the header of the message and the first <code>n</code> lines
 * of the raw content of the message.  The headers and data are
 * available in the returned InputStream.
 *
 * @param    n    number of lines of content to fetch
 * @return    InputStream containing the message headers and n content lines
 * @exception    MessagingException for failures
 */
public InputStream top(int n) throws MessagingException {
try {
  synchronized (this) {
  return folder.getProtocol().top(msgnum, n);
  }
} catch (EOFException eex) {
  folder.close(false);
  throw new FolderClosedException(folder, eex.toString());
} catch (IOException ex) {
  throw new MessagingException("error getting size", ex);
}
}
origin: camunda/camunda-bpm-platform

public Object doCommandIgnoreFailure(ProtocolCommand cmd)
      throws MessagingException {
try {
  return doProtocolCommand(cmd);
} catch (CommandFailedException cfx) {
  return null;
} catch (ConnectionException cex) {
    // Oops, the store or folder died on us.
    throwClosedException(cex);
} catch (ProtocolException pex) {
  throw new MessagingException(pex.getMessage(), pex);
}
return null;
}
origin: com.sun.mail/javax.mail

  throw new FolderClosedException(this, cex.getMessage());
} catch (ProtocolException pex) {
  throw new MessagingException(pex.getMessage(), pex);
origin: com.sun.mail/javax.mail

  serverParams = p.id(clientParams);
} catch (BadCommandException bex) {
  throw new MessagingException("ID not supported", bex);
} catch (ConnectionException cex) {
  throw new StoreClosedException(this, cex.getMessage());
} catch (ProtocolException pex) {
  throw new MessagingException(pex.getMessage(), pex);
} finally {
  releaseStoreProtocol(p);
origin: com.sun.mail/javax.mail

/**
 * Fetch the header of the message and the first <code>n</code> lines
 * of the raw content of the message.  The headers and data are
 * available in the returned InputStream.
 *
 * @param    n    number of lines of content to fetch
 * @return    InputStream containing the message headers and n content lines
 * @exception    MessagingException for failures
 */
public InputStream top(int n) throws MessagingException {
try {
  synchronized (this) {
  return folder.getProtocol().top(msgnum, n);
  }
} catch (EOFException eex) {
  folder.close(false);
  throw new FolderClosedException(folder, eex.toString());
} catch (IOException ex) {
  throw new MessagingException("error getting size", ex);
}
}
origin: com.sun.mail/javax.mail

public Object doCommandIgnoreFailure(ProtocolCommand cmd)
      throws MessagingException {
try {
  return doProtocolCommand(cmd);
} catch (CommandFailedException cfx) {
  return null;
} catch (ConnectionException cex) {
    // Oops, the store or folder died on us.
    throwClosedException(cex);
} catch (ProtocolException pex) {
  throw new MessagingException(pex.getMessage(), pex);
}
return null;
}
origin: camunda/camunda-bpm-platform

  throw new FolderClosedException(this, cex.getMessage());
} catch (ProtocolException pex) {
  throw new MessagingException(pex.getMessage(), pex);
origin: camunda/camunda-bpm-platform

  qa = p.getQuotaRoot(root);
} catch (BadCommandException bex) {
  throw new MessagingException("QUOTA not supported", bex);
} catch (ConnectionException cex) {
  throw new StoreClosedException(this, cex.getMessage());
} catch (ProtocolException pex) {
  throw new MessagingException(pex.getMessage(), pex);
} finally {
  releaseStoreProtocol(p);
origin: camunda/camunda-bpm-platform

  throw new FolderClosedException(folder, eex.toString());
} catch (IOException ex) {
  throw new MessagingException("error loading POP3 headers", ex);
origin: com.sun.mail/javax.mail

/**
 * Returns the UIDValidity for this folder.
 */
@Override
public synchronized long getUIDValidity() throws MessagingException {
if (opened) // we already have this information
  return uidvalidity;
  IMAPProtocol p = null;
  Status status = null;
try {
  p = getStoreProtocol();    // XXX
  String[] item = { "UIDVALIDITY" };
  status = p.status(fullName, item);
} catch (BadCommandException bex) {
  // Probably a RFC1730 server
  throw new MessagingException("Cannot obtain UIDValidity", bex);
} catch (ConnectionException cex) {
    // Oops, the store or folder died on us.
    throwClosedException(cex);
} catch (ProtocolException pex) {
  throw new MessagingException(pex.getMessage(), pex);
} finally {
    releaseStoreProtocol(p);
  }
if (status == null)
  throw new MessagingException("Cannot obtain UIDValidity");
return status.uidvalidity;
}
javax.mailMessagingException<init>

Javadoc

Constructs a MessagingException with no detail message.

Popular methods of MessagingException

  • getMessage
  • printStackTrace
  • getNextException
    Get the next exception chained to this one. If the next exception is a MessagingException, the chain
  • toString
    Override toString method to provide information on nested exceptions.
  • setNextException
    Add an exception to the end of the chain. If the end is not a MessagingException, this exception can
  • initCause
  • getCause
    Overrides the getCause method of Throwable to return the next exception in the chain of nested excep
  • superToString
    Return the "toString" information for this exception, without any information on nested exceptions.
  • getLocalizedMessage
  • addSuppressed
  • getStackTrace
  • setStackTrace
  • getStackTrace,
  • setStackTrace

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • getResourceAsStream (ClassLoader)
  • putExtra (Intent)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • ImageIO (javax.imageio)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now