Class AbstractTicket
java.lang.Object
ecmwf.common.ecaccess.AbstractTicket
- All Implemented Interfaces:
Closeable,Serializable,AutoCloseable
- Direct Known Subclasses:
AttachmentAccessTicket,ECaccessTicket,FileDescriptorTicket,MoverAccessTicket
The Class AbstractTicket.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe Class CompleteTicket.static interfaceThe Interface TicketUser. -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new abstract ticket.AbstractTicket(Closeable toClose) Instantiates a new abstract ticket. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(AbstractTicket.TicketUser ticketUser) Adds the.voidclose()Close.voidclose(long wait) Close.voidCompleted.voidexpired()Expired.longGets the close time.longGets the completion time.getError()Gets the error.longgetId()Gets the id.abstract StringGets the status.longgetTime()Gets the time.longGets the time out.booleanhasError()Checks for error.booleanisClosed()Checks if is closed.booleanChecks if is completed.voidNotify users.voidSets the error.voidSets the error.voidsetStamp()Sets the stamp.voidsetTimeOut(long timeOut) Sets the time out.voidSpecify which Closeable object should be closed when the ticket is closed.voidSpecify which Closeable objects should be closed when the ticket is closed.
-
Constructor Details
-
AbstractTicket
public AbstractTicket()Instantiates a new abstract ticket. -
AbstractTicket
Instantiates a new abstract ticket.- Parameters:
toClose- the to close
-
-
Method Details
-
setError
-
setError
-
getError
-
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
Adds the.- Parameters:
ticketUser- the ticket user
-
notifyUsers
public void notifyUsers()Notify users. -
toClose
Specify which Closeable objects should be closed when the ticket is closed.- Parameters:
toNotify- the to notify
-
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:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
expired
public void expired()Expired. -
close
public void close(long wait) Close.- Parameters:
wait- the wait
-
getStatus
-