Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.remote.service
Class HttpRemoteService

    java.lang.Object
      org.apache.cayenne.remote.service.BaseRemoteService
          org.apache.cayenne.remote.service.HttpRemoteService

All Implemented Interfaces:
  Remote, RemoteService

Direct Known Subclasses:
  HessianService

    public abstract class HttpRemoteService

extends BaseRemoteService

A `RemoteService` implementation that stores server context information in HTTP sessions.

Since:
  1.2

Field Summary

Fields inherited from class org.apache.cayenne.remote.service.BaseRemoteService
`contextFactory, eventBridgeFactoryName, eventBridgeParameters, logger`

Constructor Summary
`HttpRemoteService(ObjectContextFactory contextFactory, Map<String,String> eventBridgeProperties)`

Method Summary
`protected ServerSession` | `createServerSession()` Creates a new ServerSession with a dedicated DataChannel.
`protected ServerSession` | `createServerSession(String name)` Creates a new ServerSession based on a shared DataChannel.
`protected ServerSession` | `getServerSession()` Returns a ServerSession object that represents Cayenne-related state associated with the current session.
`protected abstract javax.servlet.http.HttpSession` | `getSession(boolean create)` Returns an HttpSession associated with the current request in progress.
`protected DataChannel` | `getSharedChannel(String name)`
`protected void` | `saveSharedChannel(String name, DataChannel channel)`

Methods inherited from class org.apache.cayenne.remote.service.BaseRemoteService
`createChannel, createRemoteSession, establishSession, establishSharedSession, getEventBridgeFactoryName, getEventBridgeParameters, initEventBridgeParameters, processMessage`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HttpRemoteService

    public HttpRemoteService(ObjectContextFactory contextFactory,
                             Map<String,String> eventBridgeProperties)

Since:
  3.1

Method Detail

### getSession

    protected abstract javax.servlet.http.HttpSession getSession(boolean create)

  Returns an HttpSession associated with the current request in progress.

### getServerSession

    protected ServerSession getServerSession()

  Returns a ServerSession object that represents Cayenne-related state associated with the current session. If ServerSession hasn't been previously saved, returns null.

  Specified by:
    `getServerSession` in class `BaseRemoteService`

### createServerSession

    protected ServerSession createServerSession()

  Creates a new ServerSession with a dedicated DataChannel. Returned ServerSession is stored in HttpSession for future reuse.

  Specified by:
    `createServerSession` in class `BaseRemoteService`

### createServerSession

    protected ServerSession createServerSession(String name)

  Creates a new ServerSession based on a shared DataChannel. Returned ServerSession is stored in HttpSession for future reuse.

  Specified by:
    `createServerSession` in class `BaseRemoteService`
  Parameters:
    `name` - shared session name used to lookup a shared DataChannel.

### getSharedChannel

    protected DataChannel getSharedChannel(String name)

### saveSharedChannel

    protected void saveSharedChannel(String name,
                                     DataChannel channel)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2013 Apache Cayenne. All Rights Reserved.