wyvern.lib
Class ServerURL

java.lang.Object
  extended bywyvern.lib.Location
      extended bywyvern.lib.ServerURL

public class ServerURL
extends Location

Specifies a game server to teleport to, optionally including the desired map and location in the destination server.

Version:
1.0, Apr 23, 2000
Author:
Steve Yegge

Field Summary
protected  int port_
           
protected  java.lang.String server_
           
 
Fields inherited from class wyvern.lib.Location
askMap_, map_, x_, y_
 
Constructor Summary
ServerURL()
          Required no-arg constructor for Class.newInstance().
ServerURL(java.lang.String server)
          Constructs a new ServerURL
ServerURL(java.lang.String server, int port)
          Constructs a new ServerURL
ServerURL(java.lang.String server, java.lang.String map, int x, int y)
          Constructs a new ServerURL
 
Method Summary
 int getPort()
          Returns the destination port.
 java.lang.String getServer()
          Returns the destination server.
 void setPort(int port)
          Sets the port.
 void setServer(java.lang.String server)
          Sets the server to teleport to.
 void setServer(java.lang.String server, int port)
          Sets the server to teleport to.
 
Methods inherited from class wyvern.lib.Location
equals, formatPoint, formatPoint, formatPoint, getBounds, getBounds, getMap, getPoint, getX, getY, isAsking, parseLocation, setAskMap, setCoords, setMap, setX, setY, toCommand, toPath, toString, translate, translate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

server_

protected java.lang.String server_

port_

protected int port_
Constructor Detail

ServerURL

public ServerURL()
Required no-arg constructor for Class.newInstance().


ServerURL

public ServerURL(java.lang.String server)
Constructs a new ServerURL


ServerURL

public ServerURL(java.lang.String server,
                 int port)
Constructs a new ServerURL


ServerURL

public ServerURL(java.lang.String server,
                 java.lang.String map,
                 int x,
                 int y)
Constructs a new ServerURL

Method Detail

setServer

public void setServer(java.lang.String server)
Sets the server to teleport to. Can be a DNS name or an IP address.

Parameters:
server - the server to talk to, using the default port

setServer

public void setServer(java.lang.String server,
                      int port)
Sets the server to teleport to.

Parameters:
server - the server to go to (a DNS name or IP address)
port - the port the server is running its XML/RPC listener on

setPort

public void setPort(int port)
Sets the port.


getServer

public java.lang.String getServer()
Returns the destination server.


getPort

public int getPort()
Returns the destination port.