T
- the type of the attachment that can queued for uploading.public abstract class ERAttachmentUploadQueue<T extends ERAttachment & ERRemoteAttachment> extends ERXAsyncQueue<ERAttachmentQueueEntry<T>>
ERAttachmentUploadQueue
is a queue to upload attachments.
Only ERRemoteAttachment
s can be upload using this queue.
ERRemoteAttachment
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected ERAttachmentProcessor<T> |
_processor |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
ERAttachmentUploadQueue(String name,
ERAttachmentProcessor<T> processor) |
Modifier and Type | Method and Description |
---|---|
void |
enqueue(T attachment)
Adds an attachment to the end of the queue.
|
protected abstract void |
performUpload(EOEditingContext editingContext,
T attachment,
File uploadedFile)
Perform the upload of the attachment to the remote server.
|
void |
process(ERAttachmentQueueEntry<T> entry) |
enqueue, run
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
protected final ERAttachmentProcessor<T extends ERAttachment & ERRemoteAttachment> _processor
public ERAttachmentUploadQueue(String name, ERAttachmentProcessor<T> processor)
public void enqueue(T attachment)
attachment
- the attachment to uploadpublic void process(ERAttachmentQueueEntry<T> entry)
process
in class ERXAsyncQueue<ERAttachmentQueueEntry<T extends ERAttachment & ERRemoteAttachment>>
protected abstract void performUpload(EOEditingContext editingContext, T attachment, File uploadedFile) throws Exception
attachment
- the attachment to uploaduploadedFile
- the file to uploadException
Copyright © 2002 – 2024 Project Wonder.