Class AbstractTicket

java.lang.Object
ecmwf.common.ecaccess.AbstractTicket
All Implemented Interfaces:
Closeable, Serializable, AutoCloseable
Direct Known Subclasses:
AttachmentAccessTicket, ECaccessTicket, FileDescriptorTicket, MoverAccessTicket

public abstract class AbstractTicket extends Object implements Serializable, Closeable
The Class AbstractTicket.
See Also:
  • Constructor Details

    • AbstractTicket

      public AbstractTicket()
      Instantiates a new abstract ticket.
    • AbstractTicket

      public AbstractTicket(Closeable toClose)
      Instantiates a new abstract ticket.
      Parameters:
      toClose - the to close
  • Method Details

    • setError

      public void setError(String error)
      Sets the error.
      Parameters:
      error - the new error
    • setError

      public void setError(String error, Throwable t)
      Sets the error.
      Parameters:
      error - the error
      t - the t
    • getError

      public String getError()
      Gets the error.
      Returns:
      the error
    • isClosed

      public boolean isClosed()
      Checks if is closed.
      Returns:
      true, if is closed
    • hasError

      public boolean hasError()
      Checks for error.
      Returns:
      true, if successful
    • getId

      public long getId()
      Gets the id.
      Returns:
      the id
    • getTimeOut

      public long getTimeOut()
      Gets the time out.
      Returns:
      the time out
    • setStamp

      public void setStamp()
      Sets the stamp.
    • getTime

      public long getTime()
      Gets the time.
      Returns:
      the time
    • setTimeOut

      public void setTimeOut(long timeOut)
      Sets the time out.
      Parameters:
      timeOut - the new time out
    • completed

      public void completed()
      Completed.
    • isCompleted

      public boolean isCompleted()
      Checks if is completed.
      Returns:
      true, if is completed
    • getCompletionTime

      public long getCompletionTime()
      Gets the completion time.
      Returns:
      the completion time
    • getCloseTime

      public long getCloseTime()
      Gets the close time.
      Returns:
      the close time
    • add

      public void add(AbstractTicket.TicketUser ticketUser)
      Adds the.
      Parameters:
      ticketUser - the ticket user
    • notifyUsers

      public void notifyUsers()
      Notify users.
    • toClose

      public void toClose(Closeable[] toNotify)
      Specify which Closeable objects should be closed when the ticket is closed.
      Parameters:
      toNotify - the to notify
    • toClose

      public void toClose(Closeable toClose)
      Specify which Closeable object should be closed when the ticket is closed.
      Parameters:
      toClose - the to close
    • close

      public void close()
      Close.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • expired

      public void expired()
      Expired.
    • close

      public void close(long wait)
      Close.
      Parameters:
      wait - the wait
    • getStatus

      public abstract String getStatus()
      Gets the status.
      Returns:
      the status