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

## com.ibm.aglet
Class Ticket

    java.lang.Object
      |
      +--com.ibm.aglet.Ticket

All Implemented Interfaces:
  java.io.Serializable

public class Ticket
extends java.lang.Object
implements java.io.Serializable

An agent who wants to trip somewhere, he has a ticket to there. A ticket denotes destination of the trip and way to trip.

See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `ATP` SCHEME = Protocol of agent transfer
`static java.lang.String` | `DEFAULTSCHEME` Scheme Name : default scheme name.
`static java.lang.String` | `HTTP` Scheme Name : Hyper Text Transfer Protocol HTTP is defined by World Wide Web Consortium.
`static java.lang.String` | `IIOP` Scheme Name : Internet Interoperable Object Reference IIOP is defined by OMG.
`static java.lang.String` | `RMI` Scheme Name : Remote Method Invocation

Constructor Summary
`Ticket(java.lang.String host)` Constructor with desitnation address of the trip.
`Ticket(java.lang.String destination, QoC qoc)` Constructor with desitnation address of the trip.
`Ticket(java.lang.String host, QoC qoc, java.lang.String scheme, int portNo)` Constructor with desitnation address of the trip, quality of aglet cummunication in the trip and port number of the connection.
`Ticket(java.net.URL address)` Constructor with desitnation address of the trip, quality of aglet cummunication in the trip and port number of the connection.
`Ticket(java.net.URL address, QoC qoc)` Constructor with desitnation address of the trip and quality of aglet cummunication in the trip.

Method Summary
`static int` | `getDefaultPort()` Get default port number for connection.
`java.net.URL` | `getDestination()` Get destination to where the aglet wants to trip.
`java.lang.String` | `getFile()` Get specified file.
`java.lang.String` | `getHost()` Get specified host.
`int` | `getPort()` Get specified port.
`java.lang.String` | `getProtocol()` Get specified protocol.
`QoC` | `getQoC()` Get quality of aglet communication.
`boolean` | `isDefaultPort()` Returns whether prot number is default.
`static void` | `main(java.lang.String[] args)`
`static void` | `setDefaultPort(int portNo)` Set default port number for connection.
`void` | `setDestination(java.lang.String urlstr)` Set destination to where the aglet wants to trip.
`void` | `setDestination(java.lang.String address, java.lang.String scheme, int portNo)` Set destination to where the aglet wants to trip.
`void` | `setDestination(java.net.URL destination)` Set destination to where the aglet wants to trip.
`void` | `setQoC(QoC qoc)` Set quality of aglet communication.
`java.lang.String` | `toString()` Returns a string representation of the ticket.

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

Field Detail

### ATP

    public static final java.lang.String ATP

       SCHEME = Protocol of agent transfer

  Scheme Name : Agent Transfer Protocol.

### HTTP

    public static final java.lang.String HTTP

  Scheme Name : Hyper Text Transfer Protocol HTTP is defined by World Wide Web Consortium.

### RMI

    public static final java.lang.String RMI

  Scheme Name : Remote Method Invocation

### IIOP

    public static final java.lang.String IIOP

  Scheme Name : Internet Interoperable Object Reference IIOP is defined by OMG.

### DEFAULTSCHEME

    public static final java.lang.String DEFAULTSCHEME

  Scheme Name : default scheme name.

Constructor Detail

### Ticket

    public Ticket(java.lang.String host)
           throws java.net.MalformedURLException

  Constructor with desitnation address of the trip. The quality of communication for the trip is null. The scheme name is default("atp"). The port number is default.
  Parameters:
    `host` - destination host of the trip
  Throws:
    `java.net.MalformedURLException` -

### Ticket

    public Ticket(java.lang.String destination,
                  QoC qoc)
           throws java.net.MalformedURLException

  Constructor with desitnation address of the trip. The quality of communication for the trip is null. The scheme name is default("atp"). The port number is default.
  Parameters:
    `host` - destination host of the trip
    `qoc` - quality of communication for the trip
  Throws:
    `java.net.MalformedURLException` -
  See Also:
    `QoC`

### Ticket

    public Ticket(java.lang.String host,
                  QoC qoc,
                  java.lang.String scheme,
                  int portNo)
           throws java.net.MalformedURLException

  Constructor with desitnation address of the trip, quality of aglet cummunication in the trip and port number of the connection.
  Parameters:
    `host` - destination host of the trip
    `qoc` - quality of communication for the trip
    `scheme` - scheme name of communication
    `portNo` - number of the connection
  Throws:
    `java.net.MalformedURLException` -
  See Also:
    `QoC`

### Ticket

    public Ticket(java.net.URL address)

  Constructor with desitnation address of the trip, quality of aglet cummunication in the trip and port number of the connection.
  Parameters:
    `address` - destination of the trip
  See Also:
    `QoC`

### Ticket

    public Ticket(java.net.URL address,
                  QoC qoc)

  Constructor with desitnation address of the trip and quality of aglet cummunication in the trip.
  Parameters:
    `address` - destination of the trip
    `qoc` - quality of communication for the trip
  See Also:
    `QoC`

Method Detail

### getDefaultPort

    public static int getDefaultPort()

  Get default port number for connection.
  Returns:
    default port number of the connection

### getDestination

    public java.net.URL getDestination()

  Get destination to where the aglet wants to trip.
  Returns:
    destination of the trip

### getFile

    public java.lang.String getFile()

  Get specified file.
  Returns:
    specified file

### getHost

    public java.lang.String getHost()

  Get specified host.
  Returns:
    specified host

### getPort

    public int getPort()

  Get specified port.
  Returns:
    specified port

### getProtocol

    public java.lang.String getProtocol()

  Get specified protocol.
  Returns:
    specified protocol

### getQoC

    public QoC getQoC()

  Get quality of aglet communication.
  Returns:
    quality of aglet communication in the trip

### isDefaultPort

    public boolean isDefaultPort()

  Returns whether prot number is default.

### main

    public static void main(java.lang.String[] args)

### setDefaultPort

    public static void setDefaultPort(int portNo)

  Set default port number for connection.
  Parameters:
    `portNo` - default port number of the connection

### setDestination

    public void setDestination(java.lang.String urlstr)
                        throws java.net.MalformedURLException

  Set destination to where the aglet wants to trip.
  Parameters:
    `urlstr` - destination of the trip

### setDestination

    public void setDestination(java.lang.String address,
                               java.lang.String scheme,
                               int portNo)
                        throws java.net.MalformedURLException

  Set destination to where the aglet wants to trip.
  Parameters:
    `address` - destination of the trip
    `scheme` - scheme name of communication
    `portNo` - number of the connection
  Throws:
    `java.net.MalformedURLException` -

### setDestination

    public void setDestination(java.net.URL destination)

  Set destination to where the aglet wants to trip.
  Parameters:
    `destination` - destination of the trip

### setQoC

    public void setQoC(QoC qoc)

  Set quality of aglet communication.
  Parameters:
    `qoc` - quality of aglet communication in the trip
  See Also:
    `QoC`

### toString

    public java.lang.String toString()

  Returns a string representation of the ticket.
  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a string representation of the ticket
  See Also:
    `Object.toString()`

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