com.hammingweight.hammock.mocks.microedition.io
Class MockUDPDatagramConnection

java.lang.Object
  extended by com.hammingweight.hammock.AMockObject
      extended by com.hammingweight.hammock.mocks.microedition.io.MockUDPDatagramConnection
All Implemented Interfaces:
IHammockExceptionErrors, IMockObject, javax.microedition.io.Connection, javax.microedition.io.DatagramConnection, javax.microedition.io.UDPDatagramConnection

public class MockUDPDatagramConnection
extends AMockObject
implements javax.microedition.io.UDPDatagramConnection


Field Summary
static MockMethod MTHD_CLOSE
           
static MockMethod MTHD_GET_LOCAL_ADDRESS
           
static MockMethod MTHD_GET_LOCAL_PORT
           
static MockMethod MTHD_GET_MAXIMUM_LENGTH
           
static MockMethod MTHD_GET_NOMINAL_LENGTH
           
static MockMethod MTHD_NEW_DATAGRAM_$_ARRAY_BYTE_INT
           
static MockMethod MTHD_NEW_DATAGRAM_$_ARRAY_BYTE_INT_STRING
           
static MockMethod MTHD_NEW_DATAGRAM_$_INT
           
static MockMethod MTHD_NEW_DATAGRAM_$_INT_STRING
           
static MockMethod MTHD_RECEIVE_$_DATAGRAM
           
static MockMethod MTHD_SEND_$_DATAGRAM
           
 
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
MockUDPDatagramConnection()
           
MockUDPDatagramConnection(IInvocationHandler handler)
           
 
Method Summary
 void close()
           
 java.lang.String getLocalAddress()
           
 int getLocalPort()
           
 int getMaximumLength()
           
 int getNominalLength()
           
 javax.microedition.io.Datagram newDatagram(byte[] arg0, int arg1)
           
 javax.microedition.io.Datagram newDatagram(byte[] arg0, int arg1, java.lang.String arg2)
           
 javax.microedition.io.Datagram newDatagram(int arg0)
           
 javax.microedition.io.Datagram newDatagram(int arg0, java.lang.String arg1)
           
 void receive(javax.microedition.io.Datagram arg0)
           
 void send(javax.microedition.io.Datagram 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_GET_LOCAL_ADDRESS

public static final MockMethod MTHD_GET_LOCAL_ADDRESS

MTHD_GET_LOCAL_PORT

public static final MockMethod MTHD_GET_LOCAL_PORT

MTHD_GET_MAXIMUM_LENGTH

public static final MockMethod MTHD_GET_MAXIMUM_LENGTH

MTHD_GET_NOMINAL_LENGTH

public static final MockMethod MTHD_GET_NOMINAL_LENGTH

MTHD_NEW_DATAGRAM_$_ARRAY_BYTE_INT

public static final MockMethod MTHD_NEW_DATAGRAM_$_ARRAY_BYTE_INT

MTHD_NEW_DATAGRAM_$_ARRAY_BYTE_INT_STRING

public static final MockMethod MTHD_NEW_DATAGRAM_$_ARRAY_BYTE_INT_STRING

MTHD_NEW_DATAGRAM_$_INT

public static final MockMethod MTHD_NEW_DATAGRAM_$_INT

MTHD_NEW_DATAGRAM_$_INT_STRING

public static final MockMethod MTHD_NEW_DATAGRAM_$_INT_STRING

MTHD_RECEIVE_$_DATAGRAM

public static final MockMethod MTHD_RECEIVE_$_DATAGRAM

MTHD_SEND_$_DATAGRAM

public static final MockMethod MTHD_SEND_$_DATAGRAM
Constructor Detail

MockUDPDatagramConnection

public MockUDPDatagramConnection()

MockUDPDatagramConnection

public MockUDPDatagramConnection(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

getLocalAddress

public java.lang.String getLocalAddress()
                                 throws java.io.IOException
Specified by:
getLocalAddress in interface javax.microedition.io.UDPDatagramConnection
Throws:
java.io.IOException

getLocalPort

public int getLocalPort()
                 throws java.io.IOException
Specified by:
getLocalPort in interface javax.microedition.io.UDPDatagramConnection
Throws:
java.io.IOException

getMaximumLength

public int getMaximumLength()
                     throws java.io.IOException
Specified by:
getMaximumLength in interface javax.microedition.io.DatagramConnection
Throws:
java.io.IOException

getNominalLength

public int getNominalLength()
                     throws java.io.IOException
Specified by:
getNominalLength in interface javax.microedition.io.DatagramConnection
Throws:
java.io.IOException

newDatagram

public javax.microedition.io.Datagram newDatagram(byte[] arg0,
                                                  int arg1)
                                           throws java.io.IOException
Specified by:
newDatagram in interface javax.microedition.io.DatagramConnection
Throws:
java.io.IOException

newDatagram

public javax.microedition.io.Datagram newDatagram(byte[] arg0,
                                                  int arg1,
                                                  java.lang.String arg2)
                                           throws java.io.IOException
Specified by:
newDatagram in interface javax.microedition.io.DatagramConnection
Throws:
java.io.IOException

newDatagram

public javax.microedition.io.Datagram newDatagram(int arg0)
                                           throws java.io.IOException
Specified by:
newDatagram in interface javax.microedition.io.DatagramConnection
Throws:
java.io.IOException

newDatagram

public javax.microedition.io.Datagram newDatagram(int arg0,
                                                  java.lang.String arg1)
                                           throws java.io.IOException
Specified by:
newDatagram in interface javax.microedition.io.DatagramConnection
Throws:
java.io.IOException

receive

public void receive(javax.microedition.io.Datagram arg0)
             throws java.io.IOException
Specified by:
receive in interface javax.microedition.io.DatagramConnection
Throws:
java.io.IOException

send

public void send(javax.microedition.io.Datagram arg0)
          throws java.io.IOException
Specified by:
send in interface javax.microedition.io.DatagramConnection
Throws:
java.io.IOException