StartChannelListener (BEEP Core API)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.beepcore.beep.core
Interface StartChannelListener

All Known Implementing Classes:
  EchoProfile

public interface StartChannelListener

Interface StartChannelListener StartChannelListener is an interface specifying the methods that must be implemented by any class that implements logic managing the start and close events on a channel, as well as any other events that may eventually be associated with profiles.

Method Summary
`boolean` | `advertiseProfile(Session session)` Callback that determines if a profile should be advertised or not.
`void` | `closeChannel(Channel channel)` Called when the underlying BEEP framework receives a "close" element.
`void` | `startChannel(Channel channel, java.lang.String encoding, java.lang.String data)` Called when the underlying BEEP framework receives a "start" element.

Method Detail

### advertiseProfile

    public boolean advertiseProfile(Session session)
                             throws BEEPException

  Callback that determines if a profile should be advertised or not. The `SessionTuningProperties` can be used to determine if certain attributes are in effect before a profile is advertised, such as encryption or authentication.

  Parameters:
    `session` - to check other properties such as the credentials of of the session
    `BEEPException`
  See Also:
    `for standard properties and their values`

### startChannel

    public void startChannel(Channel channel,
                             java.lang.String encoding,
                             java.lang.String data)
                      throws StartChannelException

  Called when the underlying BEEP framework receives a "start" element.

  Parameters:
    `channel` - A `Channel` object which represents a channel in this `Session`.
    `data` - The content of the "profile" element selected for this channel (may be `null`).
    `encoding` - specifies whether the content of the "profile" element selected for this channel is represented as a base64-encoded string. The `encoding` is only valid if `data` is not `null`.
  Throws:
    `StartChannelException` - Throwing this exception will cause an error to be returned to the BEEP peer requesting to start a channel. The channel is then discarded.

### closeChannel

    public void closeChannel(Channel channel)
                      throws CloseChannelException

  Called when the underlying BEEP framework receives a "close" element.

  Parameters:
    `channel` - `Channel` which received the close request.
  Throws:
    `CloseChannelException` - Throwing this exception will return an error to the BEEP peer requesting the close. The channel will remain open.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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