Overview | Package | Class | 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:
  java.io.Serializable

    public class RemoteSession

extends java.lang.Object
implements java.io.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 java.lang.String` | `eventBridgeFactory`
`protected java.util.Map` | `eventBridgeParameters`
`protected java.lang.String` | `name`
`protected java.lang.String` | `sessionId`

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

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

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

Field Detail

### name

    protected java.lang.String name

### sessionId

    protected java.lang.String sessionId

### eventBridgeFactory

    protected java.lang.String eventBridgeFactory

### eventBridgeParameters

    protected java.util.Map eventBridgeParameters

Constructor Detail

### RemoteSession

    public RemoteSession(java.lang.String sessionId)

  Creates a HessianServiceDescriptor without server events support.

### RemoteSession

    public RemoteSession(java.lang.String sessionId,
                         java.lang.String eventBridgeFactory,
                         java.util.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 `java.lang.Object`

### getSessionId

    public java.lang.String getSessionId()

### getName

    public java.lang.String getName()

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

### setName

    public void setName(java.lang.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 java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

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

Copyright © 2001-2006 Apache.org All Rights Reserved.