ome.services.messages
Class AbstractSessionMessage

java.lang.Object
  extended by java.util.EventObject
      extended by org.springframework.context.ApplicationEvent
          extended by ome.util.messages.InternalMessage
              extended by ome.services.messages.AbstractSessionMessage
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
CreateSessionMessage, DestroySessionMessage

public abstract class AbstractSessionMessage
extends InternalMessage

InternalMessage implementations which carry relate to some Session bound event. These messages are not thread-safe and so will be called within the same Thread as the publisher. This means listeners have a chance to throw an exception and cancel the related event.

See Also:
SessionManager, Serialized Form

Field Summary
 
Fields inherited from class ome.util.messages.InternalMessage
threadSafe
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
AbstractSessionMessage(Object source, String sessionId)
           
 
Method Summary
 String getSessionId()
           
 boolean isThreadSafe()
          Returns true if this message can safely be passed to another Thread.
 
Methods inherited from class org.springframework.context.ApplicationEvent
getTimestamp
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractSessionMessage

public AbstractSessionMessage(Object source,
                              String sessionId)
Method Detail

getSessionId

public String getSessionId()

isThreadSafe

public final boolean isThreadSafe()
Description copied from class: InternalMessage
Returns true if this message can safely be passed to another Thread. The default ApplicationEventMulticaster executes in the same Thread.

Overrides:
isThreadSafe in class InternalMessage


OmeroJava Api

Version: Beta-4.2.0-r7571-b29

Copyright © 2009 The University of Dundee. All Rights Reserved.