KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > jms > MockObjectMessage


1 package com.mockobjects.jms;
2
3 import com.mockobjects.ReturnValue;
4
5 import java.io.*;
6 import javax.jms.*;
7
8 public class MockObjectMessage extends MockMessage implements ObjectMessage{
9
10     private final ReturnValue objectToReturn = new ReturnValue("object");
11
12     public void setupGetObject(Serializable objectToReturn){
13         this.objectToReturn.setValue(objectToReturn);
14     }
15
16     public Serializable getObject() throws JMSException{
17         return (Serializable)objectToReturn.getValue();
18     }
19
20     public void setObject(Serializable serialisable) throws JMSException{
21     }
22
23 }
24
Popular Tags