jGCS Documentation

net.sf.jgcs
Class AbstractDataSession

java.lang.Object
  extended by net.sf.jgcs.AbstractDataSession
All Implemented Interfaces:
DataSession
Direct Known Subclasses:
AbstractPollingDataSession

public abstract class AbstractDataSession
extends java.lang.Object
implements DataSession

This class defines a AbstractDataSession. It partially implements the data session interface by handling the listeners and the group configuration.

Version:
1.0
Author:
Nuno Carvalho

Constructor Summary
protected AbstractDataSession(AbstractProtocol protocol, GroupConfiguration group)
           
 
Method Summary
protected  void boot()
           
 void close()
          Closes the session.
 GroupConfiguration getGroup()
          Gets the group associated with this session.
protected  void notifyExceptionListeners(JGCSException exception)
           
protected  java.lang.Object notifyMessageListeners(Message msg)
           
protected  void notifyServiceListeners(java.lang.Object context, Service service)
           
 void setExceptionListener(ExceptionListener listener)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jgcs.DataSession
createMessage, multicast, send
 

Constructor Detail

AbstractDataSession

protected AbstractDataSession(AbstractProtocol protocol,
                              GroupConfiguration group)
Method Detail

boot

protected void boot()

close

public void close()
Description copied from interface: DataSession
Closes the session. All resources that the session holds should be freed and therefore no subsequent communication can be done.

Specified by:
close in interface DataSession

setMessageListener

public void setMessageListener(MessageListener listener)
Description copied from interface: DataSession
Adds a listener to deliver messages from this channel.

Specified by:
setMessageListener in interface DataSession
Parameters:
listener - The listener to be bound to the channel.

setExceptionListener

public void setExceptionListener(ExceptionListener listener)
Description copied from interface: DataSession
Adds a listener to deliver exceptions related to message reception.

Specified by:
setExceptionListener in interface DataSession
Parameters:
listener - the exception thrown by the implementation of the interface.

setServiceListener

public void setServiceListener(ServiceListener listener)
Description copied from interface: DataSession
Adds a listener to deliver notifications from this channel.

Specified by:
setServiceListener in interface DataSession
Parameters:
listener - the listener to be bound to the channel.

notifyExceptionListeners

protected void notifyExceptionListeners(JGCSException exception)

notifyMessageListeners

protected java.lang.Object notifyMessageListeners(Message msg)

notifyServiceListeners

protected void notifyServiceListeners(java.lang.Object context,
                                      Service service)

getGroup

public GroupConfiguration getGroup()
Description copied from interface: DataSession
Gets the group associated with this session.

Specified by:
getGroup in interface DataSession
Returns:
the group associated with this session.

jGCS Documentation

Copyright (c) 2006, Universidade de Lisboa
For updates and related information please see jGCS home page