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

## php.java.bridge.http
Class IContextServer.ChannelName

    java.lang.Object
      php.java.bridge.http.IContextServer.ChannelName

Enclosing interface:
  IContextServer

    public abstract static class IContextServer.ChannelName

extends java.lang.Object

Represents the pipe or socket channel name.

Author:
  jostb

Constructor Summary
`IContextServer.ChannelName(java.lang.String name, java.lang.String kontext, IContextFactory currentCtx)` Create a new ChannelName.

Method Summary
`IContextFactory` | `getCtx()` Return the
`java.lang.String` | `getDefaultName()` Returns the default (persistent) name of the channel, if it exists.
`java.lang.String` | `getKontext()`
`java.lang.String` | `getName()` Returns the name of the channel, for example the socket # or the pipe name.
`boolean` | `hasDefault()` Check if the default name exists, see X_JAVABRIDGE_CONTEXT_DEFAULT
`void` | `recycle()` Recycle a ContextRunner for a new ContextServer.
`ContextRunner` | `schedule()` Check if there's a persistent ContextRunner available for the kontext.
`boolean` | `start()` Start a new ContextRunner for a given ContextServer.

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

Constructor Detail

### IContextServer.ChannelName

    public IContextServer.ChannelName(java.lang.String name,
                                      java.lang.String kontext,
                                      IContextFactory currentCtx)

  Create a new ChannelName.

  Parameters:
    `name` - The name of the channel, see X_JAVABRIDGE_CHANNEL
    `kontext` - The name of client's default context, see X_JAVABRIDGE_CONTEXT_DEFAULT
    `currentCtx` - The ContextFactory associated with the current request.

Method Detail

### getName

    public java.lang.String getName()

  Returns the name of the channel, for example the socket # or the pipe name.

  Returns:
    the name of the channel

### getDefaultName

    public java.lang.String getDefaultName()

  Returns the default (persistent) name of the channel, if it exists. Otherwise it returns the name.

  Returns:
    the persistent name of the channel from X_JAVABRIDGE_CONTEXT_DEFAULT.
  See Also:
    `getName()`

### hasDefault

    public boolean hasDefault()

  Check if the default name exists, see X_JAVABRIDGE_CONTEXT_DEFAULT

  Returns:
    true, if the persistent name exists, false otherwise.

### getCtx

    public IContextFactory getCtx()

  Return the

  Returns:
    the value for X_JAVABRIDGE_CONTEXT.

### getKontext

    public java.lang.String getKontext()

  Returns:
    the value for X_JAVABRIDGE_CONTEXT_DEFAULT.
  See Also:
    `getDefaultName()`

### schedule

    public ContextRunner schedule()

  Check if there's a persistent ContextRunner available for the kontext. After calling this method the persistent name can be queried with `getDefaultName()` and `hasDefault()`.

  Returns:
    the default name or null.

### recycle

    public void recycle()

  Recycle a ContextRunner for a new ContextServer. It checks if a ContextRunner is available for the default ContextFactory and updates the ContextRunner with the JavaBridge from the fresh ContextFactory. The new JavaBridge and ContextFactory instance are destroyed, when the request is done.

### start

    public boolean start()

  Start a new ContextRunner for a given ContextServer. The current ContextFactory becomes the default for this runner.

  Returns:
    true, if the channel is available, false otherwise.

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