-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from kenta-shimizu/v6
Add GemAccessor Interface
- Loading branch information
Showing
13 changed files
with
364 additions
and
479 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.shimizukenta.secs; | ||
|
||
import com.shimizukenta.secs.gem.Gem; | ||
|
||
/** | ||
* GEM Accessor. | ||
* | ||
* @author kenta-shimizu | ||
* | ||
*/ | ||
public interface GemAccessor extends SecsCommunicatorConfigValueGettable, SecsMessageSendable { | ||
|
||
/** | ||
* Returns GEM-interface. | ||
* | ||
* @return GEM-interface-instance | ||
*/ | ||
public Gem gem(); | ||
|
||
} |
126 changes: 126 additions & 0 deletions
126
src/main/java/com/shimizukenta/secs/SecsCommunicateStateDetectable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
package com.shimizukenta.secs; | ||
|
||
import java.util.concurrent.TimeUnit; | ||
import java.util.concurrent.TimeoutException; | ||
|
||
/** | ||
* SECS Communicate State Detectable. | ||
* | ||
* @author kenta-shimizu | ||
* | ||
*/ | ||
public interface SecsCommunicateStateDetectable { | ||
|
||
/** | ||
* Returns true if communicatable. | ||
* | ||
* <p> | ||
* Communicatable is send and receive message. | ||
* </p> | ||
* | ||
* @return true if communicatable | ||
*/ | ||
public boolean isCommunicatable(); | ||
|
||
/** | ||
* Wait until communicatable. | ||
* | ||
* <p> | ||
* Blocking-method.<br /> | ||
* If Already communicatable, do nothing.<br /> | ||
* </p> | ||
* | ||
* @throws InterruptedException if interrupted | ||
*/ | ||
public void waitUntilCommunicatable() throws InterruptedException; | ||
|
||
/** | ||
* Wait until communicatable. | ||
* | ||
* <p> | ||
* Blocking-method.<br /> | ||
* If Already communicatable, do nothing.<br /> | ||
* </p> | ||
* | ||
* @param timeout the timeout value | ||
* @param unit the timeout unit | ||
* @throws InterruptedException if interrupted | ||
* @throws TimeoutException if timeout | ||
*/ | ||
public void waitUntilCommunicatable(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException; | ||
|
||
/** | ||
* Wait until <strong>NOT</strong> communicatable. | ||
* | ||
* <p> | ||
* Blocking-method.<br /> | ||
* If Already not communicatable, do nothing.<br /> | ||
* </p> | ||
* | ||
* @throws InterruptedException if interrupted | ||
*/ | ||
public void waitUntilNotCommunicatable() throws InterruptedException; | ||
|
||
/** | ||
* Wait until <strong>NOT</strong> communicatable. | ||
* | ||
* <p> | ||
* Blocking-method.<br /> | ||
* If Already not communicatable, do nothing.<br /> | ||
* </p> | ||
* | ||
* @param timeout the timeout value | ||
* @param unit the timeout unit | ||
* @throws InterruptedException if interrupted | ||
* @throws TimeoutException if timeout | ||
*/ | ||
public void waitUntilNotCommunicatable(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException; | ||
|
||
|
||
|
||
|
||
/* Secs-Communicatable-State-Changed-Listener */ | ||
|
||
/** | ||
* Add Listener to get communicate-state-changed. | ||
* | ||
* <p> | ||
* Blocking-Listener.<br /> | ||
* Pass through quickly.<br /> | ||
* </p> | ||
* | ||
* @param listener Not accept {@code null} | ||
* @return {@code true} if add success | ||
*/ | ||
public boolean addSecsCommunicatableStateChangeListener(SecsCommunicatableStateChangeListener listener); | ||
|
||
/** | ||
* Remove Listener. | ||
* | ||
* @param listener Not accept {@code null} | ||
* @return {@code true} if remove success | ||
*/ | ||
public boolean removeSecsCommunicatableStateChangeListener(SecsCommunicatableStateChangeListener listener); | ||
|
||
/** | ||
* Add Listener to get communicate-state-changed. | ||
* | ||
* <p> | ||
* Blocking-Listener.<br /> | ||
* Pass through quickly.<br /> | ||
* </p> | ||
* | ||
* @param listener Not accept {@code null} | ||
* @return {@code true} if add success | ||
*/ | ||
public boolean addSecsCommunicatableStateChangeBiListener(SecsCommunicatableStateChangeBiListener listener); | ||
|
||
/** | ||
* Remove Listener. | ||
* | ||
* @param listener Not accept {@code null} | ||
* @return {@code true} if remove success | ||
*/ | ||
public boolean removeSecsCommunicatableStateChangeBiListener(SecsCommunicatableStateChangeBiListener listener); | ||
|
||
} |
Oops, something went wrong.