Delivers the given message to this session.
This is different from {@link ServerChannel#publish(Session,ServerMessage.Mutable)}as the message is delivered only to this session and not to all subscribers of the channel.
The message should still have a channel id specified, so that the ClientSession may identify the listeners the message should be delivered to.
@param sender the session delivering the message @param message the message to deliver @see #deliver(Session,String,Object)Sends a response to the gateway server.
@param response the response to send @throws IOException if it is not possible to contact the gateway serversocket.send(packet.getWriteBuffer())
.
@param packet the packet to deliver.
@throws org.jivesoftware.openfire.auth.UnauthorizedException if a permission error was detected.
When all preconditions are met the actual delivery is started, this is indicated by the dispatching of an {@link rinde.sim.event.Event} with{@link PDPModelEventType#START_DELIVERY} type. If there is not enough timein the specified {@link TimeLapse} to complete the delivery at once, theaction will be completed in the next tick. Note that this method does not, and in fact, should not be called again in the next tick to continue the delivery. The continued delivery is handled automatically, the effect is that the {@link Vehicle} will receive less time (or no time at all) in itsnext tick. When the delivery is completed an {@link rinde.sim.event.Event}with type {@link PDPModelEventType#END_DELIVERY} is dispatched. As a resultthe {@link Vehicle} no longer contains the {@link Parcel} and the{@link Parcel} is NOT added to the{@link rinde.sim.core.model.road.RoadModel} again. @param vehicle The {@link Vehicle} that wishes to deliver a {@link Parcel}. @param parcel The {@link Parcel} that is to be delivered. @param time The {@link TimeLapse} that is available for delivery.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|