1 /* 2 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com 3 * The software in this package is published under the terms of the CPAL v1.0 4 * license, a copy of which has been included with this distribution in the 5 * LICENSE.txt file. 6 */ 7 package org.mule.api.transport; 8 9 import org.mule.api.MuleException; 10 import org.mule.api.MuleMessage; 11 import org.mule.api.MuleSession; 12 13 /** 14 * An interface used for reading and writing session information to and from the 15 * current message. 16 */ 17 public interface SessionHandler 18 { 19 20 void storeSessionInfoToMessage(MuleSession session, MuleMessage message) throws MuleException; 21 22 /** 23 * @deprecated Use retrieveSessionInfoFromMessage(MuleMessage message) instead 24 */ 25 @Deprecated 26 void retrieveSessionInfoFromMessage(MuleMessage message, MuleSession session) throws MuleException; 27 28 MuleSession retrieveSessionInfoFromMessage(MuleMessage message) throws MuleException; 29 30 /** 31 * The property name of the session id to use when creating the Mule session. by 32 * default the property name "ID" will be used. If no property was set on the 33 * session called "ID" a session id will be automatically generated 34 * 35 * @return the property name of the session id that is set on the session 36 * @deprecated This method is no longer needed and will be removed in the next major release 37 */ 38 @Deprecated 39 String getSessionIDKey(); 40 }