The Task Bag is an object that stores (key, value) pairs. A key is a string and a value is a sequence of bytes. Its interface provides the following remote methods

pairOut, with two parameters through which the client specifies a key and a value to be stored.

pairIn, whose first parameter allows the client to specify the key of a pair to be removed from the Task Bag.

The value in the pair is supplied to the client via a second parameter. If no matching pair is available, an exception is thrown.
readPair, which is the same as pairIn except that the pair remains in the Task Bag.

Use CORBA IDL to define the interface of the Task Bag. Define an exception that can be thrown whenever any one of the operations cannot be carried out. Your exception should return an integer indicating the problem number and a string describing the problem. The Task Bag interface should define a single attribute giving the number of tasks in the bag.

Note that sequences must be defined as typedefs. Key is also a typedef for convenience.

```
typedef string Key;
typedef sequence Value;
interface TaskBag {
readonly attribute long numberOfTasks;
exception TaskBagException { long no; string reason; };
void pairOut (in Key key, in Value value) raises (TaskBagException); void pairIn (in Key key, out Value value) raises (TaskBagException); void readPair (in Key key, out Value value) raises (TaskBagException);
};
```

Computer Science & Information Technology

You might also like to view...

Another aspect associated with the security appliances is to make sure the IT staff is continually updated on technology and receive proper training. Additionally, make sure the critical systems are on a UPS system and incorporating regular what?

What will be an ideal response?

Computer Science & Information Technology

An attacker types more data in a field than the programmer expected. This is a(n) ________ attack

A. directory traversal B. buffer overflow C. XSS D. denial-of-service

Computer Science & Information Technology