jrun.jms.core.kernel.mipc
Class ObjectChannel
java.lang.Object
|
+--jrun.jms.core.kernel.mipc.ObjectChannel
- All Implemented Interfaces:
- IpcIfc
- public class ObjectChannel
- extends java.lang.Object
- implements IpcIfc
The ObjectChannel is associated with a MultiplexConnection. It makes it
easy to read and write objects from/to a multiplex channel.
- Version:
- $Revision: 1.3 $
- Author:
- Art Whitten
- See Also:
MultiplexConnection
|
Method Summary |
void |
close()
Close the channel |
MultiplexConnectionIfc |
getConnection()
Get the connection that this encapsulates |
java.lang.Object |
receive()
Receive an object from the underlying connection |
void |
send(java.io.Serializable object)
Send an object on the underlying connection |
java.lang.String |
toString()
Retrieve a unique id for this connection. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ObjectChannel
public ObjectChannel(java.lang.String label,
MultiplexConnectionIfc connection)
- Creates a new ObjectChannel with the given name on the specified
connection.
- Parameters:
label - the name of the multiplex channel to read/write from/to.connection - the underlying connection
close
public void close()
throws java.io.IOException
- Close the channel
- Specified by:
close in interface IpcIfc
- Throws:
java.io.IOException -
send
public void send(java.io.Serializable object)
throws java.io.IOException
- Send an object on the underlying connection
- Specified by:
send in interface IpcIfc
- Parameters:
object - the object to send- Throws:
java.io.IOException - if the object cannot be written to the output
stream.
receive
public java.lang.Object receive()
throws java.lang.ClassNotFoundException,
java.io.IOException
- Receive an object from the underlying connection
- Specified by:
receive in interface IpcIfc
- Returns:
- the received object
- Throws:
java.io.IOException - if the object cannot be received
toString
public java.lang.String toString()
- Retrieve a unique id for this connection.
- Specified by:
toString in interface IpcIfc- Overrides:
toString in class java.lang.Object
- Returns:
- the unique string id
getConnection
public MultiplexConnectionIfc getConnection()
- Get the connection that this encapsulates
- Returns:
- MultiplexConnection the underlying connection object.
Copyright � 2002 Macromedia Corporation. All Rights Reserved.