01: /*
02: * $Id: NullSessionHandler.java 10489 2008-01-23 17:53:38Z dfeist $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule;
12:
13: import org.mule.api.MuleException;
14: import org.mule.api.MuleMessage;
15: import org.mule.api.MuleSession;
16: import org.mule.api.transport.SessionHandler;
17:
18: /**
19: * A session handler that ignores any session information
20: */
21: public class NullSessionHandler implements SessionHandler {
22: public void retrieveSessionInfoFromMessage(MuleMessage message,
23: MuleSession session) throws MuleException {
24: // noop
25: }
26:
27: public void storeSessionInfoToMessage(MuleSession session,
28: MuleMessage message) throws MuleException {
29: // noop
30: }
31:
32: /**
33: * The property name of the session id to use when creating the Mule session. by
34: * default the property name "ID" will be used. If no property was set on the
35: * session called "ID" a session id will be automatically generated
36: *
37: * @return the property name of the session id that is set on the session
38: */
39: public String getSessionIDKey() {
40: return "ID";
41: }
42: }
|