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

## org.modeshape.web.jcr.rest.client.domain
Class Server

    java.lang.Object
      org.modeshape.web.jcr.rest.client.domain.Server

All Implemented Interfaces:
  IModeShapeObject

    @Immutable
    public class Server

extends Object
implements IModeShapeObject

The `Server` class is the business object for a server that is hosting one or more ModeShape repositories.

The server requires a url, user name, and a password in order to connect. The `url` that is used has a format of http://hostname:port/context root. Where

- hostname is the name of the server
- port is the port to connect to, generally its 8080
- context root is the deployed war context

The deployed war context root is based on what the deployed war file is called. If the ModeShape deployed war is called resources.war (which is the default build name), then the context root would be resources.

Constructor Summary
`Server(String url, String user, String password)` Constructs on new `Server`.

Method Summary
`boolean` | `equals(Object obj)`
`String` | `getName()`
`String` | `getPassword()`
`String` | `getShortDescription()`
`String` | `getUrl()`
`String` | `getUser()`
`int` | `hashCode()`
`boolean` | `hasSameKey(Server otherServer)` A server has the same identifying properties if their URL and user matches.
`String` | `toString()`

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

Constructor Detail

### Server

    public Server(String url,
                  String user,
                  String password)

  Constructs on new `Server`.

  Parameters:
    `url` - the server URL, which must contain the deployed war file context (never `null`)
    `user` - the server user (may be `null`)
    `password` - the server password (may be `null`)
  Throws:
    `IllegalArgumentException` - if the URL or user arguments are `null`

Method Detail

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`
  See Also:
    `Object.equals(java.lang.Object)`

### getName

    public String getName()

  Specified by:
    `getName` in interface `IModeShapeObject`
  Returns:
    the object name (never `null`)
  See Also:
    `IModeShapeObject.getName()`

### getPassword

    public String getPassword()

  Returns:
    the server authentication password

### getShortDescription

    public String getShortDescription()

  Specified by:
    `getShortDescription` in interface `IModeShapeObject`
  Returns:
    a description suitable for use in a tooltip (never `null`)
  See Also:
    `IModeShapeObject.getShortDescription()`

### getUrl

    public String getUrl()

  Returns:
    the server URL (never `null`)

### getUser

    public String getUser()

  Returns:
    the server authentication user (never `null`)

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`
  See Also:
    `Object.hashCode()`

### hasSameKey

    public boolean hasSameKey(Server otherServer)

  A server has the same identifying properties if their URL and user matches.

  Parameters:
    `otherServer` - the server whose key is being compared (never `null`)
  Returns:
    `true` if the servers have the same key
  Throws:
    `IllegalArgumentException` - if the argument is `null`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`
  See Also:
    `Object.toString()`

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

Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.