Package VASSAL.chat
Class HybridClient
java.lang.Object
VASSAL.chat.HybridClient
- All Implemented Interfaces:
ServerConnection,ChatServerConnection,PlayerEncoder,ChatControlsInitializer
- Direct Known Subclasses:
DynamicClient
public class HybridClient
extends Object
implements ChatServerConnection, PlayerEncoder, ChatControlsInitializer
Delegates calls to another SvrConnection instance, which can be changed programmatically
- Author:
- rkinney
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ChatServerControlsprotected Iconprotected Stringprotected Stringprotected ChatServerConnectionprotected PropertyChangeSupportFields inherited from interface VASSAL.chat.ChatServerConnection
AVAILABLE_ROOMS, DEFAULT_ROOM_NAME, INCOMING_MSG, PLAYER_INFO, ROOM, STATUS, STATUS_SERVERFields inherited from interface VASSAL.build.module.ServerConnection
CONNECTED, CONNECTION_LOST -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPropertyChangeListener(String propertyName, PropertyChangeListener l) Register a PropertyChangeListener.protected voidfireStatus(String msg) Room[]Return an array of all rooms on the servergetRoom()Return the room currently occupied by the playerReturn a Player instance representing the current playervoidinitializeControls(ChatServerControls controls) Register all event listenersbooleanvoidSend a Command to a particular playervoidSend a command to other players on the servervoidsetConnected(boolean connect) voidsetDelegate(ChatServerConnection newDelegate) voidJoin the given roomvoidSet the Player instance representing this playervoiduninitializeControls(ChatServerControls controls) Remove all previously-registered event listenersvoidupdateDisplayControls(Icon icon, String text)
-
Field Details
-
delegate
-
defaultRoom
-
propSupport
-
controls
-
currentIcon
-
currentText
-
-
Constructor Details
-
HybridClient
public HybridClient()
-
-
Method Details
-
addPropertyChangeListener
Description copied from interface:ServerConnectionRegister a PropertyChangeListener. Changes to connection status triggers a PropertyChangeEvent, and concrete implementations may define other properties- Specified by:
addPropertyChangeListenerin interfaceServerConnection
-
getAvailableRooms
Description copied from interface:ChatServerConnectionReturn an array of all rooms on the server- Specified by:
getAvailableRoomsin interfaceChatServerConnection
-
getRoom
Description copied from interface:ChatServerConnectionReturn the room currently occupied by the player- Specified by:
getRoomin interfaceChatServerConnection
-
getUserInfo
Description copied from interface:ChatServerConnectionReturn a Player instance representing the current player- Specified by:
getUserInfoin interfaceChatServerConnection
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceServerConnection
-
sendTo
Description copied from interface:ChatServerConnectionSend a Command to a particular player- Specified by:
sendToin interfaceChatServerConnection
-
sendToOthers
Description copied from interface:ServerConnectionSend a command to other players on the server- Specified by:
sendToOthersin interfaceServerConnection
-
setConnected
public void setConnected(boolean connect) - Specified by:
setConnectedin interfaceServerConnection
-
getDelegate
-
setRoom
Description copied from interface:ChatServerConnectionJoin the given room- Specified by:
setRoomin interfaceChatServerConnection
-
setUserInfo
Description copied from interface:ChatServerConnectionSet the Player instance representing this player- Specified by:
setUserInfoin interfaceChatServerConnection
-
stringToPlayer
- Specified by:
stringToPlayerin interfacePlayerEncoder
-
playerToString
- Specified by:
playerToStringin interfacePlayerEncoder
-
fireStatus
-
setDelegate
-
initializeControls
Description copied from interface:ChatControlsInitializerRegister all event listeners- Specified by:
initializeControlsin interfaceChatControlsInitializer
-
uninitializeControls
Description copied from interface:ChatControlsInitializerRemove all previously-registered event listeners- Specified by:
uninitializeControlsin interfaceChatControlsInitializer
-
updateDisplayControls
-