|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.beepcore.beep.profile.echo.EchoProfile
This is the Echo profile implementation
Field Summary | |
static java.lang.String |
ECHO_URI
|
Constructor Summary | |
EchoProfile()
|
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. |
StartChannelListener |
init(java.lang.String uri,
ProfileConfiguration config)
Initializes the profile and returns the StartChannelListener for uri . |
void |
receiveMSG(MessageMSG message)
Called to process the request in received MSG message. |
void |
startChannel(Channel channel,
java.lang.String encoding,
java.lang.String data)
Called when the underlying BEEP framework receives a "start" element. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String ECHO_URI
Constructor Detail |
public EchoProfile()
Method Detail |
public StartChannelListener init(java.lang.String uri, ProfileConfiguration config) throws BEEPException
Profile
StartChannelListener
for uri
.
init
in interface Profile
uri
- config
-
StartChannelListener
for
the specified uri.
BEEPException
public void startChannel(Channel channel, java.lang.String encoding, java.lang.String data) throws StartChannelException
StartChannelListener
startChannel
in interface StartChannelListener
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
.
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.public void closeChannel(Channel channel) throws CloseChannelException
StartChannelListener
closeChannel
in interface StartChannelListener
channel
- Channel
which received the close request.
CloseChannelException
- Throwing this exception will return an
error to the BEEP peer requesting the close. The channel will remain
open.public boolean advertiseProfile(Session session)
StartChannelListener
SessionTuningProperties
can be used to determine if
certain attributes are in effect before a profile is advertised,
such as encryption or authentication.
advertiseProfile
in interface StartChannelListener
session
- to check other properties such as the credentials of
of the sessionfor standard properties and their values
public void receiveMSG(MessageMSG message)
RequestHandler
receiveMSG
in interface RequestHandler
message
- MSG Message received.MessageMSG
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |