Package jmri.jmrix.loconet.locormi
Class LnMessageBuffer
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- jmri.jmrix.loconet.locormi.LnMessageBuffer
-
- All Implemented Interfaces:
java.io.Serializable
,java.rmi.Remote
,java.util.EventListener
,LocoNetListener
,LnMessageBufferInterface
public class LnMessageBuffer extends java.rmi.server.UnicastRemoteObject implements LnMessageBufferInterface, LocoNetListener
Handle an RMI connection for a single remote client.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.LinkedList<LocoNetMessage>
messageList
(package private) LnTrafficController
tc
-
Constructor Summary
Constructors Constructor Description LnMessageBuffer(LnTrafficController _tc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
void
disable(int mask)
void
enable(int mask)
java.lang.Object[]
getMessages(long timeout)
void
message(LocoNetMessage msg)
Member function that will be invoked by a LocoNetInterface implementation to forward a LocoNet message from the layout.void
sendLocoNetMessage(LocoNetMessage m)
-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
-
-
-
-
Field Detail
-
messageList
java.util.LinkedList<LocoNetMessage> messageList
-
-
Constructor Detail
-
LnMessageBuffer
public LnMessageBuffer(LnTrafficController _tc) throws java.rmi.RemoteException
- Throws:
java.rmi.RemoteException
-
-
Method Detail
-
enable
public void enable(int mask) throws java.rmi.RemoteException
- Specified by:
enable
in interfaceLnMessageBufferInterface
- Throws:
java.rmi.RemoteException
-
disable
public void disable(int mask) throws java.rmi.RemoteException
- Specified by:
disable
in interfaceLnMessageBufferInterface
- Throws:
java.rmi.RemoteException
-
clear
public void clear() throws java.rmi.RemoteException
- Specified by:
clear
in interfaceLnMessageBufferInterface
- Throws:
java.rmi.RemoteException
-
message
public void message(LocoNetMessage msg)
Description copied from interface:LocoNetListener
Member function that will be invoked by a LocoNetInterface implementation to forward a LocoNet message from the layout.- Specified by:
message
in interfaceLocoNetListener
- Parameters:
msg
- The received LocoNet message. Note that this same object may be presented to multiple users. It should not be modified here.
-
getMessages
public java.lang.Object[] getMessages(long timeout)
- Specified by:
getMessages
in interfaceLnMessageBufferInterface
-
sendLocoNetMessage
public void sendLocoNetMessage(LocoNetMessage m)
- Specified by:
sendLocoNetMessage
in interfaceLnMessageBufferInterface
-
-