## org.beepcore.beep.core
Interface Channel

All Known Implementing Classes:
  SharedChannel

public interface Channel

This interface represents the operations available for all BEEP Channels.

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`

Method Summary
`void` `close()` Closes the channel.
`java.lang.Object` `getAppData()` Returns application context data previously set using `setAppData()`.
`MessageListener` `getMessageListener()` Deprecated.
`int` `getNumber()` Return the number of this `Channel`.
`java.lang.String` `getProfile()`
`RequestHandler` `getRequestHandler()` Returns the `RequestHandler` registered with this channel.
`Session` `getSession()` Returns the session for this channel.
`java.lang.String` `getStartData()` Deprecated.
`int` `getState()` Returns the state of this channel.
`MessageStatus` `sendMSG(OutputDataStream stream, ReplyListener replyListener)` Sends a MSG message.
`void` `setAppData(java.lang.Object applicationData)` Set the application context data.
`MessageListener` `setMessageListener(MessageListener listener)` Deprecated.
`RequestHandler` `setRequestHandler(RequestHandler handler)` Sets the MSG handler for this `Channel`.
`RequestHandler` `setRequestHandler(RequestHandler handler, boolean tuningReset)` Sets the MSG handler for this `Channel`.
`void` `setStartData(java.lang.String data)` Deprecated.

Field Detail

### STATE_INITIALIZED

    public static final int STATE_INITIALIZED

See Also:
  Constant Field Values

### STATE_STARTING

    public static final int STATE_STARTING

See Also:
  Constant Field Values

### STATE_ACTIVE

    public static final int STATE_ACTIVE

See Also:
  Constant Field Values

### STATE_TUNING_PENDING

    public static final int STATE_TUNING_PENDING

See Also:
  Constant Field Values

### STATE_TUNING

    public static final int STATE_TUNING

See Also:
  Constant Field Values

### STATE_CLOSE_PENDING

    public static final int STATE_CLOSE_PENDING

See Also:
  Constant Field Values

### STATE_CLOSING

    public static final int STATE_CLOSING

See Also:
  Constant Field Values

### STATE_CLOSED

    public static final int STATE_CLOSED

See Also:
  Constant Field Values

### STATE_ABORTED

    public static final int STATE_ABORTED

See Also:
  Constant Field Values

Method Detail

### close

    public void close()
               throws BEEPException

  Closes the channel.

  Throws:
    `BEEPException`

### getAppData

    public java.lang.Object getAppData()

  Returns application context data previously set using `setAppData()`.

  See Also:
    `setAppData(java.lang.Object)`

### setAppData

    public void setAppData(java.lang.Object applicationData)

  Set the application context data.

  See Also:
    `getAppData()`

### getNumber

    public int getNumber()

  Return the number of this `Channel`.

### setMessageListener

    public MessageListener setMessageListener(MessageListener listener)

  Deprecated.

  Sets the `MessageListener` for this channel.

  Parameters:
    `listener` -
  Returns:
    The previous MessageListener or null if none was set.

### getMessageListener

    public MessageListener getMessageListener()

  Deprecated.

  Returns the message listener for this channel.

### getRequestHandler

    public RequestHandler getRequestHandler()

  Returns the `RequestHandler` registered with this channel.

### setRequestHandler

    public RequestHandler setRequestHandler(RequestHandler handler)

  Sets the MSG handler for this `Channel`.

  Parameters:
    `handler` - `RequestHandler` to handle received MSG messages.
  Returns:
    The previous `RequestHandler` or `null` if one wasn't set.

### setRequestHandler

    public RequestHandler setRequestHandler(RequestHandler handler,
                                            boolean tuningReset)

  Sets the MSG handler for this `Channel`.

  Parameters:
    `handler` - `RequestHandler` to handle received MSG messages.
    `tuningReset` - flag indicating that the profile will request a tuning reset.
  Returns:
    The previous `RequestHandler` or `null` if one wasn't set.

### getSession

    public Session getSession()

  Returns the session for this channel.

### getState

    public int getState()

  Returns the state of this channel.

### sendMSG

    public MessageStatus sendMSG(OutputDataStream stream,
                                 ReplyListener replyListener)
                          throws BEEPException

  Sends a MSG message.

  Parameters:
    `stream` - Data contents of the MSG message to be sent.
    `replyListener` - A listener to be notified when a reply to this MSG is received.
  Returns:
    MessageStatus
  Throws:
    `BEEPException` - if an error is encoutered.
  See Also:
    `OutputDataStream`, `MessageStatus`

### setStartData

    public void setStartData(java.lang.String data)

  Deprecated.

### getStartData

    public java.lang.String getStartData()

  Deprecated.

### getProfile

    public java.lang.String getProfile()

Copyright ? 2001 Invisible Worlds, Inc. All Rights Reserved.