com.twistedmatrix.spread.pb
Class Connection

java.lang.Object
  |
  +--com.twistedmatrix.spread.pb.Connection

public class Connection
extends java.lang.Object

Various methods for connecting to a remote PB servers.


Field Summary
static ByteString ATTACH
           
static ByteString RESPOND
           
static ByteString ROOT
           
static ByteString USERNAME
           
 
Constructor Summary
Connection()
           
 
Method Summary
static ByteString challengeResponse(ByteString challenge, ByteString password)
          Make a response to a challenge.
static RemoteReference connect(StreamPair sp, ByteString username, ByteString password, ByteString service)
          Log in to a perspective whose name is the same as the username.
static RemoteReference connect(StreamPair sp, ByteString username, ByteString password, ByteString service, ByteString perspective)
          Log in to a perspective.
static RemoteReference getObjectAt(StreamPair sp)
          Get the remote object at the root of server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROOT

public static final ByteString ROOT

USERNAME

public static final ByteString USERNAME

RESPOND

public static final ByteString RESPOND

ATTACH

public static final ByteString ATTACH
Constructor Detail

Connection

public Connection()
Method Detail

getObjectAt

public static RemoteReference getObjectAt(StreamPair sp)
Get the remote object at the root of server.

connect

public static RemoteReference connect(StreamPair sp,
                                      ByteString username,
                                      ByteString password,
                                      ByteString service,
                                      ByteString perspective)
                               throws RemoteReference.RemoteError,
                                      java.io.IOException
Log in to a perspective.
Parameters:
sp - an open connection to a remote server.
username - the name you will be identified as to the authorizer.
password - the password for this username.
service - the service to request.
perspective - the name of the perspective to request.

connect

public static RemoteReference connect(StreamPair sp,
                                      ByteString username,
                                      ByteString password,
                                      ByteString service)
                               throws RemoteReference.RemoteError,
                                      java.io.IOException
Log in to a perspective whose name is the same as the username.
Parameters:
sp - an open connection to a remote server.
username - the name you will be identified as to the authorizer.
password - the password for this username.
service - the service to request.

challengeResponse

public static ByteString challengeResponse(ByteString challenge,
                                           ByteString password)
Make a response to a challenge.