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
Class RemoteSession

    java.lang.Object
      org.apache.cayenne.remote.RemoteSession

All Implemented Interfaces:
  Serializable

    public class RemoteSession

extends Object
implements Serializable

A descriptor used by default service implementation to pass session parameters to the client. It provides the client with details on how to invoke the service and how to listen for the server events.

Since:
  1.2
Author:
  Andrus Adamchik
See Also:
  Serialized Form

Field Summary
`protected String` | `eventBridgeFactory`
`protected Map` | `eventBridgeParameters`
`protected String` | `name`
`protected String` | `sessionId`

Constructor Summary
`RemoteSession(String sessionId)` Creates a HessianServiceDescriptor without server events support.
`RemoteSession(String sessionId, String eventBridgeFactory, Map eventBridgeParameters)` Creates a HessianServiceDescriptor.

Method Summary
`EventBridge` | `createServerEventBridge()` Creates an EventBridge that will listen for server events.
`String` | `getName()` Returns session group name.
`String` | `getSessionId()` Returns server session id.
`int` | `hashCode()`
`boolean` | `isServerEventsEnabled()`
`void` | `setName(String name)`
`String` | `toString()`

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

Field Detail

### name

    protected String name

### sessionId

    protected String sessionId

### eventBridgeFactory

    protected String eventBridgeFactory

### eventBridgeParameters

    protected Map eventBridgeParameters

Constructor Detail

### RemoteSession

    public RemoteSession(String sessionId)

  Creates a HessianServiceDescriptor without server events support.

### RemoteSession

    public RemoteSession(String sessionId,
                         String eventBridgeFactory,
                         Map eventBridgeParameters)

  Creates a HessianServiceDescriptor. If `eventBridgeFactory` argument is not null, session will support server events.

Method Detail

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### getSessionId

    public String getSessionId()

  Returns server session id. This is often the same as HttpSession id.

### getName

    public String getName()

  Returns session group name. Group name is used for shared sessions.

### setName

    public void setName(String name)

### isServerEventsEnabled

    public boolean isServerEventsEnabled()

### createServerEventBridge

    public EventBridge createServerEventBridge()
                                        throws CayenneRuntimeException

  Creates an EventBridge that will listen for server events. Returns null if server events support is not configured in the descriptor.

  Throws:
    `CayenneRuntimeException` - if EventBridge startup fails for any reason.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

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-2008 Apache Cayenne. All Rights Reserved.