|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.beepcore.beep.core.Channel
Channel is a conduit for a certain kind of traffic over a session, determined by the profile of the channel. Channels are created by Session
Field Summary | |
static int |
STATE_ABORTED
|
static int |
STATE_ACTIVE
|
static int |
STATE_CLOSE_PENDING
|
static int |
STATE_CLOSED
|
static int |
STATE_CLOSING
|
static int |
STATE_INITIALIZED
|
static int |
STATE_STARTING
|
static int |
STATE_TUNING
|
static int |
STATE_TUNING_PENDING
|
Constructor Summary | |
protected |
Channel(java.lang.String profile,
java.lang.String number,
MessageListener listener,
boolean blocking,
Session session)
Create a Channel object. |
protected |
Channel(java.lang.String profile,
java.lang.String number,
Session session)
|
Method Summary | |
void |
close()
Closes the channel. |
java.lang.Object |
getAppData()
Returns application context data previously set using setAppData() . |
int |
getBufferSize()
Returns the receive buffer size for this channel. |
int |
getBufferUsed()
Returns the size of the used portion of the receive buffer for this channel. |
MessageListener |
getMessageListener()
Returns the message listener for this channel. |
int |
getNumber()
Return the number of this Channel . |
java.lang.String |
getProfile()
Returns the profile for this channel. |
Session |
getSession()
Returns the session for this channel. |
java.lang.String |
getStartData()
Used to get data that can be piggybacked on a profile reply to a start channel request (or any other scenario we choose) Could be called by users, profile implementors etc. |
MessageStatus |
sendMSG(OutputDataStream stream,
ReplyListener replyListener)
Sends a message of type MSG. |
void |
setAppData(java.lang.Object applicationData)
Set the application context data member for future retrieval. |
MessageListener |
setMessageListener(MessageListener ml)
Sets the MessageListener for this channel. |
void |
setReceiveBufferSize(int size)
Sets the receive buffer size for this channel. |
void |
setStartData(java.lang.String data)
Used to set data that can be piggybacked on a profile reply to a start channel request (or any other scenario we choose) called by Channel Zero |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int STATE_INITIALIZED
public static final int STATE_STARTING
public static final int STATE_ACTIVE
public static final int STATE_TUNING_PENDING
public static final int STATE_TUNING
public static final int STATE_CLOSE_PENDING
public static final int STATE_CLOSING
public static final int STATE_CLOSED
public static final int STATE_ABORTED
Constructor Detail |
protected Channel(java.lang.String profile, java.lang.String number, MessageListener listener, boolean blocking, Session session)
Channel
object.
profile
- URI string of the profile that this channel will "speak".number
- The channel number.listener
- message listener that will receive callbacks for
messages received on this channelsession
- Session
over which this channel
sends/receives messagesSession
,
MessageListener
protected Channel(java.lang.String profile, java.lang.String number, Session session)
Method Detail |
public void close() throws BEEPException
BEEPException
public java.lang.Object getAppData()
setAppData()
.
setAppData(java.lang.Object)
public void setAppData(java.lang.Object applicationData)
getAppData()
public int getBufferSize()
public int getBufferUsed()
public int getNumber()
Channel
.
public void setReceiveBufferSize(int size) throws BEEPException
size
-
BEEPException
public MessageListener setMessageListener(MessageListener ml)
MessageListener
for this channel.
ml
-
public MessageListener getMessageListener()
public Session getSession()
public MessageStatus sendMSG(OutputDataStream stream, ReplyListener replyListener) throws BEEPException
stream
- Data to send in the form of DataStream
.replyListener
- A "one-shot" listener that will handle replies
to this sendMSG listener.
BEEPException
- if an error is encoutered.OutputDataStream
,
MessageStatus
public java.lang.String getProfile()
public void setStartData(java.lang.String data)
public java.lang.String getStartData()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |