|
jGCS Documentation | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DataSession
This class defines a DataSession. This Session must be used to send and receive messages to/from the group. An instance of a DataSession must be created on the Protocol interface.
Protocol
Method Summary | |
---|---|
void |
close()
Closes the session. |
Message |
createMessage()
Creates an empty message that can be used (transmitted) through the session. |
GroupConfiguration |
getGroup()
Gets the group associated with this session. |
void |
multicast(Message msg,
Service service,
java.lang.Object cookie,
Annotation... annotation)
Sends a message to the group. |
void |
send(Message msg,
Service service,
java.lang.Object cookie,
java.net.SocketAddress destination,
Annotation... annotation)
Sends a message to one particular member of the group. |
void |
setExceptionListener(ExceptionListener exception)
Adds a listener to deliver exceptions related to message reception. |
void |
setMessageListener(MessageListener listener)
Adds a listener to deliver messages from this channel. |
void |
setServiceListener(ServiceListener listener)
Adds a listener to deliver notifications from this channel. |
Method Detail |
---|
GroupConfiguration getGroup()
void setMessageListener(MessageListener listener) throws ClosedSessionException
listener
- The listener to be bound to the channel.
ClosedSessionException
void setServiceListener(ServiceListener listener) throws ClosedSessionException
listener
- the listener to be bound to the channel.
ClosedSessionException
void setExceptionListener(ExceptionListener exception) throws ClosedSessionException
exception
- the exception thrown by the implementation of the interface.
ClosedSessionException
void close()
Message createMessage() throws ClosedSessionException
ClosedSessionException
void multicast(Message msg, Service service, java.lang.Object cookie, Annotation... annotation) throws java.io.IOException, UnsupportedServiceException
Sends a message to the group.
msg
- The message to be sent.service
- the service needed by the application for message delivery (e.g. total order)
or null to use the default channel service.cookie
- a cookie used to identify the message in the future (e.g. service notifications).annotation
- semantic information provided by the application
to be used by communication protocols (e.g. semantic reliability).
java.io.IOException
UnsupportedServiceException
void send(Message msg, Service service, java.lang.Object cookie, java.net.SocketAddress destination, Annotation... annotation) throws java.io.IOException, UnsupportedServiceException
Sends a message to one particular member of the group.
msg
- The message to be sent.service
- the service needed by the application for message delivery (e.g. total order)
or null to use the default channel service.cookie
- a cookie used to identify the message in the future (e.g. service notifications).destination
- the destination of the message.annotation
- semantic information provided by the application
to be used by communication protocols (e.g. semantic reliability).
java.io.IOException
UnsupportedServiceException
|
jGCS Documentation | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |