net.sf.jame.service.network
Class ServiceSession

java.lang.Object
  extended by net.sf.jame.service.network.ServiceSession

public abstract class ServiceSession
extends java.lang.Object

Author:
Andrea Medeghini

Field Summary
protected  ServiceConsumer consumer
           
protected  ServiceProducer producer
           
protected  java.lang.String sessionId
           
 
Constructor Summary
ServiceSession(java.lang.String sessionId, ServiceConsumer consumer, ServiceProducer producer)
           
 
Method Summary
 void dispose()
           
 java.lang.String getSessionId()
           
 void invalidate()
           
 boolean isExpired()
           
abstract  boolean isLocalSession()
           
 void sendAckMessage()
           
 void sendKeepAliveMessage()
           
 void sendMessage(ServiceMessage message)
           
 void setEndpoint(ServiceEndpoint endpoint)
           
 void setEndpointJobCount(int jobCount)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

consumer

protected ServiceConsumer consumer

producer

protected ServiceProducer producer

sessionId

protected java.lang.String sessionId
Constructor Detail

ServiceSession

public ServiceSession(java.lang.String sessionId,
                      ServiceConsumer consumer,
                      ServiceProducer producer)
Parameters:
sessionId -
consumer -
producer -
Method Detail

getSessionId

public java.lang.String getSessionId()
Returns:

dispose

public void dispose()

isExpired

public boolean isExpired()
Returns:

sendMessage

public void sendMessage(ServiceMessage message)
                 throws ServiceException
Parameters:
message -
Throws:
java.lang.Exception
ServiceException

invalidate

public void invalidate()

isLocalSession

public abstract boolean isLocalSession()
Returns:

sendKeepAliveMessage

public void sendKeepAliveMessage()
                          throws ServiceException
Throws:
ServiceException

sendAckMessage

public void sendAckMessage()
                    throws ServiceException
Throws:
ServiceException

setEndpoint

public void setEndpoint(ServiceEndpoint endpoint)
Parameters:
endpoint -

setEndpointJobCount

public void setEndpointJobCount(int jobCount)
Parameters:
jobCount -