alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Tomcat example source code file (SessionMessage.java)

This example Tomcat source code file (SessionMessage.java) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Tomcat tags/keywords

clustermessage, evt_all_session_data, evt_all_session_data, evt_all_session_transfercomplete, evt_get_all_sessions, evt_get_all_sessions, evt_session_accessed, evt_session_created, evt_session_delta, evt_session_expired, sessionmessage, sessionmessage, string, string

The Tomcat SessionMessage.java source code

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.catalina.ha.session;
import org.apache.catalina.ha.ClusterMessage;

/**
 *
 * <B>Class Description:
* The SessionMessage class is a class that is used when a session has been * created, modified, expired in a Tomcat cluster node.<BR> * * The following events are currently available: * <ul> * <li>
public static final int EVT_SESSION_CREATED
  • * <li>
    public static final int EVT_SESSION_ACCESSED
  • * <li>
    public static final int EVT_ATTRIBUTE_ADDED
  • * <li>
    public static final int EVT_ATTRIBUTE_REMOVED
  • * <li>
    public static final int EVT_SESSION_EXPIRED_WONOTIFY
  • * <li>
    public static final int EVT_SESSION_EXPIRED_WNOTIFY
  • * <li>
    public static final int EVT_GET_ALL_SESSIONS
  • * <li>
    public static final int EVT_SET_USER_PRINCIPAL
  • * <li>
    public static final int EVT_SET_SESSION_NOTE
  • * <li>
    public static final int EVT_REMOVE_SESSION_NOTE
  • * </ul> * */ public interface SessionMessage extends ClusterMessage, java.io.Serializable { /** * Event type used when a session has been created on a node */ public static final int EVT_SESSION_CREATED = 1; /** * Event type used when a session has expired */ public static final int EVT_SESSION_EXPIRED = 2; /** * Event type used when a session has been accessed (ie, last access time * has been updated. This is used so that the replicated sessions will not expire * on the network */ public static final int EVT_SESSION_ACCESSED = 3; /** * Event type used when a server comes online for the first time. * The first thing the newly started server wants to do is to grab the * all the sessions from one of the nodes and keep the same state in there */ public static final int EVT_GET_ALL_SESSIONS = 4; /** * Event type used when an attribute has been added to a session, * the attribute will be sent to all the other nodes in the cluster */ public static final int EVT_SESSION_DELTA = 13; /** * When a session state is transferred, this is the event. */ public static final int EVT_ALL_SESSION_DATA = 12; /** * When a session state is complete transferred, this is the event. */ public static final int EVT_ALL_SESSION_TRANSFERCOMPLETE = 14; public String getContextName(); public String getEventTypeString(); /** * returns the event type * @return one of the event types EVT_XXXX */ public int getEventType(); /** * @return the serialized data for the session */ public byte[] getSession(); /** * @return the session ID for the session */ public String getSessionID(); }//SessionMessage
  • Other Tomcat examples (source code examples)

    Here is a short list of links related to this Tomcat SessionMessage.java source code file:

    ... this post is sponsored by my books ...

    #1 New Release!

    FP Best Seller

     

    new blog posts

     

    Copyright 1998-2024 Alvin Alexander, alvinalexander.com
    All Rights Reserved.

    A percentage of advertising revenue from
    pages under the /java/jwarehouse URI on this website is
    paid back to open source projects.