|
JmDNS 3.4.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DNSStatefulObject
Sets of methods to manage the state machine.
Implementation note: This interface is accessed from multiple threads. The implementation must be thread safe.
| Nested Class Summary | |
|---|---|
static class |
DNSStatefulObject.DefaultImplementation
|
static class |
DNSStatefulObject.DNSStatefulObjectSemaphore
This class define a semaphore. |
| Method Summary | |
|---|---|
boolean |
advanceState(DNSTask task)
Sets the state and notifies all objects that wait on the ServiceInfo. |
void |
associateWithTask(DNSTask task,
DNSState state)
Sets the task associated with this Object. |
boolean |
cancelState()
Sets the state and notifies all objects that wait on the ServiceInfo. |
boolean |
closeState()
Sets the state and notifies all objects that wait on the ServiceInfo. |
JmDNSImpl |
getDns()
Returns the DNS associated with this object. |
boolean |
isAnnounced()
Returns true, if this is an announced state. |
boolean |
isAnnouncing()
Returns true, if this is an announcing state. |
boolean |
isAssociatedWithTask(DNSTask task,
DNSState state)
Checks if this object is associated with the task and in the same state. |
boolean |
isCanceled()
Returns true, if this is a canceled state. |
boolean |
isCanceling()
Returns true, if this is a canceling state. |
boolean |
isClosed()
Returns true, if this is a closed state. |
boolean |
isClosing()
Returns true, if this is a closing state. |
boolean |
isProbing()
Returns true, if this is a probing state. |
boolean |
recoverState()
Sets the state and notifies all objects that wait on the ServiceInfo. |
void |
removeAssociationWithTask(DNSTask task)
Remove the association of the task with this Object. |
boolean |
revertState()
Sets the state and notifies all objects that wait on the ServiceInfo. |
boolean |
waitForAnnounced(long timeout)
Waits for the object to be announced. |
boolean |
waitForCanceled(long timeout)
Waits for the object to be canceled. |
| Method Detail |
|---|
JmDNSImpl getDns()
void associateWithTask(DNSTask task,
DNSState state)
task - associated taskstate - state of the taskvoid removeAssociationWithTask(DNSTask task)
task - associated task
boolean isAssociatedWithTask(DNSTask task,
DNSState state)
task - associated taskstate - state of the task
true is the task is associated with this object, false otherwise.boolean advanceState(DNSTask task)
task - associated task
truefalse otherwise.DNSState.advance()boolean revertState()
truefalse otherwise.DNSState.revert()boolean cancelState()
truefalse otherwise.boolean closeState()
truefalse otherwise.boolean recoverState()
truefalse otherwise.boolean isProbing()
true if probing state, false otherwiseboolean isAnnouncing()
true if announcing state, false otherwiseboolean isAnnounced()
true if announced state, false otherwiseboolean isCanceling()
true if canceling state, false otherwiseboolean isCanceled()
true if canceled state, false otherwiseboolean isClosing()
true if closing state, false otherwiseboolean isClosed()
true if closed state, false otherwiseboolean waitForAnnounced(long timeout)
timeout - the maximum time to wait in milliseconds.
true if the object is announced, false otherwiseboolean waitForCanceled(long timeout)
timeout - the maximum time to wait in milliseconds.
true if the object is canceled, false otherwise
|
Last updated 2011-08-25 12:40 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||