Package com.mockobjects.jms

# Class MockSession

java.lang.Object
com.mockobjects.MockObject
com.mockobjects.jms.MockSession

All Implemented Interfaces:
  `Verifiable`

Direct Known Subclasses:
  `MockQueueSession`, `MockTopicSession`

public class MockSession extends MockObject

## Constructor Summary

Constructors
Constructor
Description
`MockSession()`

## Method Summary

Modifier and Type
Method
Description
`void`
`close()`
`void`
`commit()`
`BytesMessage`
`createBytesMessage()`
`MapMessage`
`createMapMessage()`
`Message`
`createMessage()`
`ObjectMessage`
`createObjectMessage()`
`ObjectMessage`
`createObjectMessage(Serializable object)`
`StreamMessage`
`createStreamMessage()`
`TextMessage`
`createTextMessage()`
`TextMessage`
`createTextMessage(String text)`
`MessageListener`
`getMessageListener()`
`boolean`
`getTransacted()`
`void`
`recover()`
`void`
`rollback()`
`void`
`run()`
`void`
`setExpectedCloseCalls(int callCount)`
`void`
`setExpectedCreateTextMessageCalls(int callCount)`
`void`
`setMessageListener(MessageListener listener)`
`void`
`setupCreateObjectMessage(ObjectMessage objectMessageToReturn)`
`void`
`setupTextMessage(TextMessage textMessage)`
`void`
`setupThrowException(JMSException e)`

### Methods inherited from class com.mockobjects.MockObject

`notImplemented, notYetImplemented, verify`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MockSession

public MockSession()

## Method Details

### setupCreateObjectMessage

public void setupCreateObjectMessage(ObjectMessage objectMessageToReturn)

### createObjectMessage

public ObjectMessage createObjectMessage() throws JMSException

Throws:
  `JMSException`

### createObjectMessage

public ObjectMessage createObjectMessage(Serializable object) throws JMSException

Throws:
  `JMSException`

### rollback

public void rollback() throws JMSException

Throws:
  `JMSException`

### setupTextMessage

public void setupTextMessage(TextMessage textMessage)

### createBytesMessage

public BytesMessage createBytesMessage() throws JMSException

Throws:
  `JMSException`

### createMapMessage

public MapMessage createMapMessage() throws JMSException

Throws:
  `JMSException`

### createMessage

public Message createMessage() throws JMSException

Throws:
  `JMSException`

### getTransacted

public boolean getTransacted() throws JMSException

Throws:
  `JMSException`

### recover

public void recover() throws JMSException

Throws:
  `JMSException`

### close

public void close() throws JMSException

Throws:
  `JMSException`

### commit

public void commit() throws JMSException

Throws:
  `JMSException`

### setMessageListener

public void setMessageListener(MessageListener listener) throws JMSException

Throws:
  `JMSException`

### setExpectedCloseCalls

public void setExpectedCloseCalls(int callCount)

### setExpectedCreateTextMessageCalls

public void setExpectedCreateTextMessageCalls(int callCount)

### createStreamMessage

public StreamMessage createStreamMessage() throws JMSException

Throws:
  `JMSException`

### createTextMessage

public TextMessage createTextMessage() throws JMSException

Throws:
  `JMSException`

### createTextMessage

public TextMessage createTextMessage(String text) throws JMSException

Throws:
  `JMSException`

### getMessageListener

public MessageListener getMessageListener() throws JMSException

Throws:
  `JMSException`

### run

public void run()

### setupThrowException

public void setupThrowException(JMSException e)