omnisockets
Class OmniMessage

java.lang.Object
  |
  +--omnisockets.OmniMessage
All Implemented Interfaces:
java.lang.Runnable, java.io.Serializable

public class OmniMessage
extends java.lang.Object
implements java.lang.Runnable, java.io.Serializable

When a message is received on an OmniSocket, the socket creates an OmniMessage of the appropriate type, and runs its message handler in a thread. The message thread is a daemon thread and has the same priority as the OmniSocket that created it. The message priority can be modified by raising or lowering the OmniSocket priority.

Since:
OmniSockets 1.0
Version:
1.0.beta.1, 10/31/2002
Author:
Richard Bockenek
See Also:
OmniSocket, Serialized Form

Constructor Summary
OmniMessage()
           
 
Method Summary
 omnisockets.OmniListener getListener()
          Returns the listener.
 omnisockets.OmniSocket getSocket()
          Returns the socket.
 void run()
          Runs the virtual message handler, invoked by the OmniSocket when a message is received on the socket.
 omnisockets.OmniListener setListener(omnisockets.OmniListener listener)
          Sets the listener.
 omnisockets.OmniSocket setSocket(omnisockets.OmniSocket socket)
          Sets the socket.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OmniMessage

public OmniMessage()
Method Detail

getListener

public omnisockets.OmniListener getListener()
Returns the listener.


setListener

public omnisockets.OmniListener setListener(omnisockets.OmniListener listener)
Sets the listener.

Returns:
the old listener

getSocket

public omnisockets.OmniSocket getSocket()
Returns the socket.


setSocket

public omnisockets.OmniSocket setSocket(omnisockets.OmniSocket socket)
Sets the socket.

Returns:
the old socket

run

public void run()
Runs the virtual message handler, invoked by the OmniSocket when a message is received on the socket.

Specified by:
run in interface java.lang.Runnable
See Also:
OmniSocket.run()