com.hammingweight.hammock.mocks.microedition.media.protocol
Class MockDataSource

java.lang.Object
  extended by javax.microedition.media.protocol.DataSource
      extended by com.hammingweight.hammock.mocks.microedition.media.protocol.MockDataSource
All Implemented Interfaces:
IMockObject, javax.microedition.media.Controllable

public class MockDataSource
extends javax.microedition.media.protocol.DataSource
implements IMockObject


Field Summary
static MockMethod MTHD_CONNECT
           
static MockMethod MTHD_DISCONNECT
           
static MockMethod MTHD_GET_CONTENT_TYPE
           
static MockMethod MTHD_GET_CONTROL_$_STRING
           
static MockMethod MTHD_GET_CONTROLS
           
static MockMethod MTHD_GET_LOCATOR
           
static MockMethod MTHD_GET_STREAMS
           
static MockMethod MTHD_START
           
static MockMethod MTHD_STOP
           
 
Constructor Summary
MockDataSource(java.lang.String arg0)
           
MockDataSource(java.lang.String arg0, IInvocationHandler handler)
           
 
Method Summary
 void connect()
           
 void disconnect()
           
 java.lang.String getContentType()
           
 javax.microedition.media.Control getControl(java.lang.String arg0)
           
 javax.microedition.media.Control[] getControls()
           
 IInvocationHandler getInvocationHandler()
          Gets the invocation handler that the mock object uses to evaluate method invocations.
 java.lang.String getLocator()
           
 javax.microedition.media.protocol.SourceStream[] getStreams()
           
 void setInvocationHandler(IInvocationHandler handler)
          Sets the invocation handler that the mock object should use to evaluate method invocations.
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MTHD_CONNECT

public static final MockMethod MTHD_CONNECT

MTHD_DISCONNECT

public static final MockMethod MTHD_DISCONNECT

MTHD_GET_CONTENT_TYPE

public static final MockMethod MTHD_GET_CONTENT_TYPE

MTHD_GET_CONTROLS

public static final MockMethod MTHD_GET_CONTROLS

MTHD_GET_CONTROL_$_STRING

public static final MockMethod MTHD_GET_CONTROL_$_STRING

MTHD_GET_LOCATOR

public static final MockMethod MTHD_GET_LOCATOR

MTHD_GET_STREAMS

public static final MockMethod MTHD_GET_STREAMS

MTHD_START

public static final MockMethod MTHD_START

MTHD_STOP

public static final MockMethod MTHD_STOP
Constructor Detail

MockDataSource

public MockDataSource(java.lang.String arg0)

MockDataSource

public MockDataSource(java.lang.String arg0,
                      IInvocationHandler handler)
Method Detail

setInvocationHandler

public final void setInvocationHandler(IInvocationHandler handler)
Description copied from interface: IMockObject
Sets the invocation handler that the mock object should use to evaluate method invocations.

Specified by:
setInvocationHandler in interface IMockObject
Parameters:
handler - The invocation handler to be used by the mock object.

getInvocationHandler

public final IInvocationHandler getInvocationHandler()
Description copied from interface: IMockObject
Gets the invocation handler that the mock object uses to evaluate method invocations.

Specified by:
getInvocationHandler in interface IMockObject
Returns:
The invocation handler used by the mock object.

connect

public void connect()
             throws java.io.IOException
Specified by:
connect in class javax.microedition.media.protocol.DataSource
Throws:
java.io.IOException

disconnect

public void disconnect()
Specified by:
disconnect in class javax.microedition.media.protocol.DataSource

getContentType

public java.lang.String getContentType()
Specified by:
getContentType in class javax.microedition.media.protocol.DataSource

getControls

public javax.microedition.media.Control[] getControls()
Specified by:
getControls in interface javax.microedition.media.Controllable
Specified by:
getControls in class javax.microedition.media.protocol.DataSource

getControl

public javax.microedition.media.Control getControl(java.lang.String arg0)
Specified by:
getControl in interface javax.microedition.media.Controllable
Specified by:
getControl in class javax.microedition.media.protocol.DataSource

getLocator

public java.lang.String getLocator()
Overrides:
getLocator in class javax.microedition.media.protocol.DataSource

getStreams

public javax.microedition.media.protocol.SourceStream[] getStreams()
Specified by:
getStreams in class javax.microedition.media.protocol.DataSource

start

public void start()
           throws java.io.IOException
Specified by:
start in class javax.microedition.media.protocol.DataSource
Throws:
java.io.IOException

stop

public void stop()
          throws java.io.IOException
Specified by:
stop in class javax.microedition.media.protocol.DataSource
Throws:
java.io.IOException