com.hammingweight.hammock.mocks.wireless.messaging
Class MockMessageConnection

java.lang.Object
  extended by com.hammingweight.hammock.AMockObject
      extended by com.hammingweight.hammock.mocks.wireless.messaging.MockMessageConnection
All Implemented Interfaces:
IHammockExceptionErrors, IMockObject, javax.microedition.io.Connection, javax.wireless.messaging.MessageConnection

public class MockMessageConnection
extends AMockObject
implements javax.wireless.messaging.MessageConnection


Field Summary
static MockMethod MTHD_CLOSE
           
static MockMethod MTHD_NEW_MESSAGE_$_STRING
           
static MockMethod MTHD_NEW_MESSAGE_$_STRING_STRING
           
static MockMethod MTHD_NUMBER_OF_SEGMENTS_$_MESSAGE
           
static MockMethod MTHD_RECEIVE
           
static MockMethod MTHD_SEND_$_MESSAGE
           
static MockMethod MTHD_SET_MESSAGE_LISTENER_$_MESSAGELISTENER
           
 
Fields inherited from interface javax.wireless.messaging.MessageConnection
BINARY_MESSAGE, MULTIPART_MESSAGE, TEXT_MESSAGE
 
Fields inherited from interface com.hammingweight.hammock.IHammockExceptionErrors
ARGUMENT_MATCHER_ALREADY_SET, CANT_SET_VOID_RETURN_VALUE, CLASS_IS_NOT_THROWABLE, DOES_NOT_SUBCLASS_MOCK_OBJECT, HANDLER_NOT_SET, INCORRECT_MOCK_OBJECT, INCORRECT_RETURN_CLASS, INCORRECT_THROWABLE_CLASS, METHOD_CANNOT_BE_EVALUATED, METHOD_INVOKED_OUT_OF_SEQUENCE, METHOD_INVOKED_TOO_MANY_TIMES, METHOD_INVOKED_UNEXPECTED_NUMBER_OF_TIMES, NO_RETURN_VALUE, NO_RETURN_VALUE_SET, NUM_INVOCATIONS_ALREADY_SET, RETURN_VALUE_ALREADY_SET, WRONG_ARGUMENT_CLASS, WRONG_NUMBER_OF_ARGS
 
Constructor Summary
MockMessageConnection()
           
MockMessageConnection(IInvocationHandler handler)
           
 
Method Summary
 void close()
           
 javax.wireless.messaging.Message newMessage(java.lang.String arg0)
           
 javax.wireless.messaging.Message newMessage(java.lang.String arg0, java.lang.String arg1)
           
 int numberOfSegments(javax.wireless.messaging.Message arg0)
           
 javax.wireless.messaging.Message receive()
           
 void send(javax.wireless.messaging.Message arg0)
           
 void setMessageListener(javax.wireless.messaging.MessageListener arg0)
           
 
Methods inherited from class com.hammingweight.hammock.AMockObject
assertReturnNotNull, getInvocationHandler, setInvocationHandler
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MTHD_CLOSE

public static final MockMethod MTHD_CLOSE

MTHD_NEW_MESSAGE_$_STRING

public static final MockMethod MTHD_NEW_MESSAGE_$_STRING

MTHD_NEW_MESSAGE_$_STRING_STRING

public static final MockMethod MTHD_NEW_MESSAGE_$_STRING_STRING

MTHD_NUMBER_OF_SEGMENTS_$_MESSAGE

public static final MockMethod MTHD_NUMBER_OF_SEGMENTS_$_MESSAGE

MTHD_RECEIVE

public static final MockMethod MTHD_RECEIVE

MTHD_SEND_$_MESSAGE

public static final MockMethod MTHD_SEND_$_MESSAGE

MTHD_SET_MESSAGE_LISTENER_$_MESSAGELISTENER

public static final MockMethod MTHD_SET_MESSAGE_LISTENER_$_MESSAGELISTENER
Constructor Detail

MockMessageConnection

public MockMessageConnection()

MockMessageConnection

public MockMessageConnection(IInvocationHandler handler)
Method Detail

close

public void close()
           throws java.io.IOException
Specified by:
close in interface javax.microedition.io.Connection
Throws:
java.io.IOException

newMessage

public javax.wireless.messaging.Message newMessage(java.lang.String arg0)
Specified by:
newMessage in interface javax.wireless.messaging.MessageConnection

newMessage

public javax.wireless.messaging.Message newMessage(java.lang.String arg0,
                                                   java.lang.String arg1)
Specified by:
newMessage in interface javax.wireless.messaging.MessageConnection

numberOfSegments

public int numberOfSegments(javax.wireless.messaging.Message arg0)
Specified by:
numberOfSegments in interface javax.wireless.messaging.MessageConnection

receive

public javax.wireless.messaging.Message receive()
                                         throws java.io.IOException,
                                                java.io.InterruptedIOException
Specified by:
receive in interface javax.wireless.messaging.MessageConnection
Throws:
java.io.IOException
java.io.InterruptedIOException

send

public void send(javax.wireless.messaging.Message arg0)
          throws java.io.IOException,
                 java.io.InterruptedIOException
Specified by:
send in interface javax.wireless.messaging.MessageConnection
Throws:
java.io.IOException
java.io.InterruptedIOException

setMessageListener

public void setMessageListener(javax.wireless.messaging.MessageListener arg0)
                        throws java.io.IOException
Specified by:
setMessageListener in interface javax.wireless.messaging.MessageConnection
Throws:
java.io.IOException