We use a computational technique based on the immersed boundary method to construct a four-roll mill device with which we can generate a broad spectrum of flow types from an extensional flow to a rotational one. We put a vesicle or a bubble in the constructed four-roll mill device to investigate their interaction with the surrounding fluid. The vesicle dynamics are determined by its bending rigidity, inextensibility, and hydrodynamical force, whereas the bubble dynamics is governed by the surface tension and the hydrodynamic interaction. Depending on the type of the flow, these suspended objects go through either a tank-treading motion or a tumbling motion. We validate our numerical method by a convergence study and discuss the transition between tank-treading and tumbling motions for the vesicles and bubbles.