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 class
The Class CompleteTicket.static interface
The Interface TicketUser. -
Constructor Summary
ConstructorsConstructorDescriptionInstantiates a new abstract ticket.AbstractTicket
(Closeable toClose) Instantiates a new abstract ticket. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(AbstractTicket.TicketUser ticketUser) Adds the.void
close()
Close.void
close
(long wait) Close.void
Completed.void
expired()
Expired.long
Gets the close time.long
Gets the completion time.getError()
Gets the error.long
getId()
Gets the id.abstract String
Gets the status.long
getTime()
Gets the time.long
Gets the time out.boolean
hasError()
Checks for error.boolean
isClosed()
Checks if is closed.boolean
Checks if is completed.void
Notify users.void
Sets the error.void
Sets the error.void
setStamp()
Sets the stamp.void
setTimeOut
(long timeOut) Sets the time out.void
Specify which Closeable object should be closed when the ticket is closed.void
Specify 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
expired
public void expired()Expired. -
close
public void close(long wait) Close.- Parameters:
wait
- the wait
-
getStatus
-