org.glassfish.examples.http
Class HttpEventReceiver

java.lang.Object
  extended by org.glassfish.examples.http.HttpEventReceiver

@PerLookup
public class HttpEventReceiver
extends Object

This receiver will receive a specific kind of HttpRequest where the elements of the request have these types:

  1. The rank of the request is an integer
  2. The id of the request is a long
  3. The requested action is a String

The getHttpRequest method of this class is annotated with the

Author:
jwells

Constructor Summary
HttpEventReceiver()
           
 
Method Summary
 String getLastAction()
           
 long getLastId()
           
 int getLastRank()
           
 void receiveRequest(int rank, long id, String action, Logger logger)
          This method will get called back with the information filled in from the request, either from the Alternate injection resolver or from the system provided three-thirty resolver
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpEventReceiver

public HttpEventReceiver()
Method Detail

receiveRequest

public void receiveRequest(int rank,
                           long id,
                           String action,
                           Logger logger)
This method will get called back with the information filled in from the request, either from the Alternate injection resolver or from the system provided three-thirty resolver

Parameters:
rank - the rank, parameter zero of the HttpRequest (from the alternate)
id - the id, parameter one of the HttpRequest (from the alternate)
action - the action, parameter two of the HttpRequest (from the alternate)
logger - a logger to send interesting messages to

getLastRank

public int getLastRank()
Returns:
the lastRank

getLastId

public long getLastId()
Returns:
the lastId

getLastAction

public String getLastAction()
Returns:
the lastAction


Copyright © 2013 Oracle Corporation. All Rights Reserved.