subject

Import com. programix. thread.*; /**
* StringHandoff is used to pass a String from one thread to another.
* The passer and the receiver meet inside an instance for the handoff.
* For example, if pass() is called and there is not receiver waiting, the
* thread calling pass() will block until the receiver arrives. Similarly,
* if receive() is called and there is no passer waiting, the thread calling
* receive() will block until the passer arrives.
*
* There can only be one thread waiting to pass at any given time. If a second
* thread tries to call pass() when another thread is already waiting to pass,
* an IllegalStateException is thrown. Similarly, there can only be one thread
* waiting to receive at any given time. If a second thread tries to call
* receive() when another thread is already waiting to receive, an
* IllegalStateException is thrown. IllegalStateException is a RuntimeException.
*
* Methods that take a timeout parameter will throw a TimedOutException if
* the specified number of milliseconds passes without the handoff occurring.
* TimedOutException is a RuntimeException.
*
* The methods that declare that they may throw a ShutdownException will do
* so after shutdown() has been called. If a thread is waiting inside a method
* and another thread calls shutdown(), then the waiting thread will throw
* a ShutdownException. If a thread calls a method that declares that it may
* throw a ShutdownException, and any thread has already called shutdown(), then
* the call will immediately throw the ShutdownException.
* ShutdownException is a RuntimeException.
*/
public interface StringHandoff {
void pass(String msg, long msTimeout) throws InterruptedException,
TimedOutException,
ShutdownException,
IllegalStateException;
void pass(String msg) throws InterruptedException,
ShutdownException,
IllegalStateException;
String receive(long msTimeout) throws InterruptedException,
TimedOutException,
ShutdownException,
IllegalStateException;
String receive() throws InterruptedException,
ShutdownException,
IllegalStateException;
void shutdown();
Object getLockObject();
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:00
What is one of the main problems that can occur when implementing a large number of new systems within an organization?
Answers: 1
question
Computers and Technology, 22.06.2019 01:00
Which option marks all modification made within a document? review comment track changes balloons
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Acloud service provider uses the internet to deliver a computing environment for developing, running, and managing software applications. which cloud service model does the provider offer? a. iaas b. caas c. maas d. paas e. saas
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
To move a file or folder in microsoft windows, you can click and hold down the left mouse button while moving your mouse pointer to the location you want the file or folder to be, which is also known as.
Answers: 3
You know the right answer?
Import com. programix. thread.*; /**
* StringHandoff is used to pass a String from one thread...
Questions
question
Chemistry, 26.10.2019 16:43
question
Physics, 26.10.2019 16:43
question
History, 26.10.2019 16:43
Questions on the website: 13722363