net.sf.juoserver.controller
Interface IntercomListener

All Known Subinterfaces:
Controller
All Known Implementing Classes:
ControllerImpl

public interface IntercomListener

Definition of an actor interested in receiving notifications about other mobiles from the other connected clients.


Method Summary
 void attach()
          Detach the listener from the communication network.
 void detach()
          Attach the listener to the communication network.
 void onChangedClothes(Mobile wearingMobile)
          Receives the notification that the specified mobile has changed their clothes.
 void onEnteredRange(Mobile entered, UOObject target)
          Receives an update about a mobile, entered, which enters another mobile's, target, range.
 void onItemDropped(Mobile droppingMobile, Item item, int targetSerialId, int targetX, int targetY, int targetZ)
          Receives the notification about an item being dropped.
 void onOtherMobileMovement(Mobile movingMobile)
          Receives an update about another mobile's movement.
 void onOtherMobileSpeech(Mobile speaker, MessageType type, int hue, int font, String language, String text)
          Receives an update about another mobile's speech.
 

Method Detail

detach

void detach()
Attach the listener to the communication network.


attach

void attach()
Detach the listener from the communication network.


onOtherMobileMovement

void onOtherMobileMovement(Mobile movingMobile)
Receives an update about another mobile's movement.

Parameters:
movingMobile - the other, moving mobile
Throws:
IntercomException - in case of inter-client communication errors

onEnteredRange

void onEnteredRange(Mobile entered,
                    UOObject target)
Receives an update about a mobile, entered, which enters another mobile's, target, range.

Parameters:
entered - the mobile who has entered the target's range
target - the mobile whose range is being entered
Throws:
IntercomException - in case of inter-client communication errors

onOtherMobileSpeech

void onOtherMobileSpeech(Mobile speaker,
                         MessageType type,
                         int hue,
                         int font,
                         String language,
                         String text)
Receives an update about another mobile's speech.

Parameters:
speaker - the speaking mobile
type - message type
hue - message colour
font - message font
language - message language
text - message text
Throws:
IntercomException - in case of inter-client communication errors

onItemDropped

void onItemDropped(Mobile droppingMobile,
                   Item item,
                   int targetSerialId,
                   int targetX,
                   int targetY,
                   int targetZ)
Receives the notification about an item being dropped.

Parameters:
droppingMobile - mobile dropping the item
item - item
targetSerialId - target serial ID
targetX - target X
targetY - target Y
targetZ - target Z

onChangedClothes

void onChangedClothes(Mobile wearingMobile)
Receives the notification that the specified mobile has changed their clothes.

Parameters:
wearingMobile - the mobile changing their clothes


Copyright © 2010-2012. All Rights Reserved.