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

## com.ericsson.otp.ic
Class Environment

    java.lang.Object
      |
      +--com.ericsson.otp.ic.Environment

public class Environment
extends java.lang.Object

The Environment class handles communication setup and stub state. The methods of this class are specially designed for the generated stubs. This class must be used when designing asynchronous message passing.

Constructor Summary
`Environment()` Server skeleton side constructor.
`Environment(com.ericsson.otp.erlang.OtpConnection _connection, java.lang.Object _Server)` Client stub side constructor.
`Environment(com.ericsson.otp.erlang.OtpSelf _Self, com.ericsson.otp.erlang.OtpPeer _Peer, java.lang.Object _Server)` Client stub side constructor.
`Environment(java.lang.String _SelfNode, java.lang.String _PeerNode, java.lang.String _Cookie, java.lang.Object _Server)` Client stub side constructor.

Method Summary
`com.ericsson.otp.erlang.OtpErlangPid` | `caller_pid()` Caller identity accessor.
`void` | `client_stop_server()`
`void` | `connect()` Client stub side connector.
`void` | `disconnect()` Closes the established connection.
`com.ericsson.otp.erlang.OtpInputStream` | `getIs()` Input Stream accessor.
`com.ericsson.otp.erlang.OtpOutputStream` | `getOs()` Output Stream accessor.
`com.ericsson.otp.erlang.OtpErlangPid` | `getScaller()` Server skeleton side client (caller) pid accessor.
`com.ericsson.otp.erlang.OtpErlangRef` | `getSref()` Server skeleton side client call reference accessor.
`void` | `init()` Private variable initialization.
`boolean` | `isStopped()` Server stop request controller.
`void` | `receive()` Client message receiver.
`void` | `receive(com.ericsson.otp.erlang.OtpConnection _connection)` Universal message receiver.
`com.ericsson.otp.erlang.OtpErlangRef` | `received_ref()` Received message reference accessor.
`void` | `reconnect()` Reconnects a client by closing existing connection and connecting.
`void` | `send()` Client side message sender.
`void` | `server_stop_server()`
`java.lang.Object` | `server()` Server RegName/OtpErlangPid accessor.
`void` | `uHead()` Decodes the message head from existing stream.
`void` | `uHead(com.ericsson.otp.erlang.OtpInputStream _is)` Decodes the message head and writes over input stream.
`int` | `uLabel(java.util.Dictionary _operations)` Operation label accessor.
`boolean` | `validOp(java.util.Dictionary _operations)` Operation controller.
`void` | `write_client_pid()` Client Pid Encoder.
`void` | `write_client_ref()` Client Ref Encoder.

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

Constructor Detail

### Environment

    public Environment(com.ericsson.otp.erlang.OtpSelf _Self,
                       com.ericsson.otp.erlang.OtpPeer _Peer,
                       java.lang.Object _Server)
                throws java.lang.Exception

  Client stub side constructor.

### Environment

    public Environment(java.lang.String _SelfNode,
                       java.lang.String _PeerNode,
                       java.lang.String _Cookie,
                       java.lang.Object _Server)
                throws java.lang.Exception

  Client stub side constructor.

### Environment

    public Environment(com.ericsson.otp.erlang.OtpConnection _connection,
                       java.lang.Object _Server)
                throws java.lang.Exception

  Client stub side constructor.

### Environment

    public Environment()
                throws java.lang.Exception

  Server skeleton side constructor.

Method Detail

### connect

    public void connect()
                 throws java.lang.Exception

  Client stub side connector.

### reconnect

    public void reconnect()
                   throws java.lang.Exception

  Reconnects a client by closing existing connection and connecting.

### disconnect

    public void disconnect()

  Closes the established connection.

### send

    public void send()
              throws java.lang.Exception

  Client side message sender.

### receive

    public void receive()
                 throws java.lang.Exception

  Client message receiver.

### receive

    public void receive(com.ericsson.otp.erlang.OtpConnection _connection)
                 throws java.lang.Exception

  Universal message receiver.

### server

    public java.lang.Object server()

  Server RegName/OtpErlangPid accessor. Used to access the server Reg/Pid, which initiated the connection.
  Returns:
    java.lang.Object, the server for the active OtpConnection.

### caller_pid

    public com.ericsson.otp.erlang.OtpErlangPid caller_pid()

  Caller identity accessor. Used by a server stub to access the caller identity of the received message.
  Returns:
    OtpErlangPid, the caller identity.

### received_ref

    public com.ericsson.otp.erlang.OtpErlangRef received_ref()

  Received message reference accessor. Used by a server stub to access the reference of the received message.
  Returns:
    OtpErlangRef, the reference of the received message.

### write_client_pid

    public void write_client_pid()

  Client Pid Encoder. Used by a server stub to encode the enclosed client process identity.

### write_client_ref

    public void write_client_ref()

  Client Ref Encoder. Used by a server stub to encode the enclosed client message reference.

### getOs

    public com.ericsson.otp.erlang.OtpOutputStream getOs()

  Output Stream accessor.
  Returns:
    OtpOutputStream, the enclosed output stream.

### getIs

    public com.ericsson.otp.erlang.OtpInputStream getIs()

  Input Stream accessor.
  Returns:
    OtpInputStream, the enclosed input stream.

### getScaller

    public com.ericsson.otp.erlang.OtpErlangPid getScaller()

  Server skeleton side client (caller) pid accessor.
  Returns:
    OtpErlangPid, the caller process identity.

### getSref

    public com.ericsson.otp.erlang.OtpErlangRef getSref()

  Server skeleton side client call reference accessor.
  Returns:
    OtpErlangRef, the latest call message reference.

### uHead

    public void uHead()
               throws java.lang.Exception

  Decodes the message head from existing stream. Assignes message data to private variables of the Environment Object.

### uHead

    public void uHead(com.ericsson.otp.erlang.OtpInputStream _is)
               throws java.lang.Exception

  Decodes the message head and writes over input stream. Assignes message data to private variables of the Environment Object.

### uLabel

    public int uLabel(java.util.Dictionary _operations)

  Operation label accessor.
  Returns:
    int, the label hash value.

### validOp

    public boolean validOp(java.util.Dictionary _operations)

  Operation controller.
  Returns:
    boolean, true if the operation variable found in Environment class is supported in the input operation dictionary, false otherwize.

### isStopped

    public boolean isStopped()

  Server stop request controller.
  Returns:
    boolean, true if there is a client request for the server to be stopped, false otherwize.

### client_stop_server

    public void client_stop_server()
                            throws java.lang.Exception

### server_stop_server

    public void server_stop_server()

### init

    public void init()

  Private variable initialization.

Package | Class | Tree | Deprecated | Index | Help
| Copyright © 1991-2007 Ericsson AB
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD