Save This Page
Home » apache-openwebbeans-1.0.0-incubating-M3-sources » javax.enterprise.context » [javadoc | source]
    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one
    3    * or more contributor license agreements.  See the NOTICE file
    4    * distributed with this work for additional information
    5    * regarding copyright ownership.  The ASF licenses this file
    6    * to you under the Apache License, Version 2.0 (the
    7    * "License"); you may not use this file except in compliance
    8    * with the License.  You may obtain a copy of the License at
    9    *
   10    * http://www.apache.org/licenses/LICENSE-2.0
   11    *
   12    * Unless required by applicable law or agreed to in writing,
   13    * software distributed under the License is distributed on an
   14    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   15    * KIND, either express or implied.  See the License for the
   16    * specific language governing permissions and limitations
   17    * under the License.
   18    */
   19   package javax.enterprise.context;
   20   
   21   /**
   22    * Defines the conversation instance contract for using
   23    * in the {@link ConversationScoped} webbeans components.
   24    * 
   25    * <p>
   26    * Please see the <b>8.5.4 Conversation context lifecycle</b> of the specification.
   27    * </p>
   28    * 
   29    * @see ConversationScoped
   30    */
   31   public interface Conversation
   32   {
   33       /**
   34        * Starts new conversation.
   35        */
   36       public void begin();
   37   
   38       /**
   39        * Starts new conversation with the given id.
   40        * 
   41        * @param id conversation id.
   42        */
   43       public void begin(String id);
   44   
   45       /**
   46        * Ends of the conversation.
   47        */
   48       public void end();
   49   
   50       /**
   51        * Returns true if conversation is marked as a long running false otherwise.
   52        * 
   53        * @return true if conversation is marked as a long running false otherwise
   54        */
   55       public boolean isLongRunning();
   56   
   57       /**
   58        * Gets conversation id.
   59        * 
   60        * @return conversation id
   61        */
   62       public String getId();
   63   
   64       /**
   65        * Returns conversation time out.
   66        * 
   67        * @return conversation timeout
   68        */
   69       public long getTimeout();
   70   
   71       /**
   72        * Sets conversation timeout in ms.
   73        * 
   74        * @param milliseconds timeout of the conversation
   75        */
   76       public void setTimeout(long milliseconds);
   77   
   78   }

Save This Page
Home » apache-openwebbeans-1.0.0-incubating-M3-sources » javax.enterprise.context » [javadoc | source]