net.dpml.transit.model
Interface HostModel

All Superinterfaces:
Remote

public interface HostModel
extends Remote

The HostModel interface is implemented by objects that control the the configuration of resource host implementations. An instance of an implementation of HostModel may be passed as a constructor argument to a resource host implmentation. Implementation shall maintain synchronization via change events raised by implementations of this interface.

Version:
1.0.1
Author:
Digital Product Meta Library

Field Summary
static int FTP_PORT
          FTP port number.
static int HTTP_PORT
          HTTP port number.
static int HTTPS_PORT
          HTTPS port number.
 
Method Summary
 void addHostListener(HostListener listener)
          Add a host change listener to the director.
 PasswordAuthentication getAuthentication()
          Return the host password authentication credentials.
 String getBasePath()
          Return the host base path.
 URL getBaseURL()
          Return the host base url.
 boolean getEnabled()
          Return the enabled status of the host.
 String getID()
          Return an immutable host identifier.
 String getIndexPath()
          Return index path.
 URL getIndexURL()
          Return index url.
 LayoutModel getLayoutModel()
          Return the layout strategy model.
 int getPriority()
          Return the host priority.
 RequestIdentifier getRequestIdentifier()
          Return the host request identifier.
 boolean getTrusted()
          Return the trusted status.
 void removeHostListener(HostListener listener)
          Remove a host change listener from the director.
 

Field Detail

HTTP_PORT

public static final int HTTP_PORT
HTTP port number.

See Also:
Constant Field Values

FTP_PORT

public static final int FTP_PORT
FTP port number.

See Also:
Constant Field Values

HTTPS_PORT

public static final int HTTPS_PORT
HTTPS port number.

See Also:
Constant Field Values
Method Detail

getID

public String getID()
             throws RemoteException
Return an immutable host identifier. The host identifier shall be guranteed to be unique and constant for the life of the model.

Returns:
the host id
Throws:
RemoteException - if a remote exception occurs

getPriority

public int getPriority()
                throws RemoteException
Return the host priority.

Returns:
the host priority setting
Throws:
RemoteException - if a remote exception occurs

getBasePath

public String getBasePath()
                   throws RemoteException
Return the host base path.

Returns:
the base path
Throws:
RemoteException - if a remote exception occurs

getBaseURL

public URL getBaseURL()
               throws RemoteException
Return the host base url.

Returns:
the base url
Throws:
RemoteException - if a remote exception occurs

getIndexPath

public String getIndexPath()
                    throws RemoteException
Return index path.

Returns:
the index path
Throws:
RemoteException - if a remote exception occurs

getIndexURL

public URL getIndexURL()
                throws RemoteException
Return index url.

Returns:
the index url
Throws:
RemoteException - if a remote exception occurs

getEnabled

public boolean getEnabled()
                   throws RemoteException
Return the enabled status of the host.

Returns:
TRUE if enabled
Throws:
RemoteException - if a remote exception occurs

getTrusted

public boolean getTrusted()
                   throws RemoteException
Return the trusted status.

Returns:
TRUE if trusted
Throws:
RemoteException - if a remote exception occurs

getAuthentication

public PasswordAuthentication getAuthentication()
                                         throws RemoteException
Return the host password authentication credentials.

Returns:
the password authentication credentials
Throws:
RemoteException - if a remote exception occurs

getRequestIdentifier

public RequestIdentifier getRequestIdentifier()
                                       throws RemoteException
Return the host request identifier.

Returns:
the identifier
Throws:
RemoteException - if a remote exception occurs

getLayoutModel

public LayoutModel getLayoutModel()
                           throws RemoteException
Return the layout strategy model.

Returns:
the layout model
Throws:
RemoteException - if a remote exception occurs

addHostListener

public void addHostListener(HostListener listener)
                     throws RemoteException
Add a host change listener to the director.

Parameters:
listener - the host change listener to add
Throws:
RemoteException - if a remote exception occurs

removeHostListener

public void removeHostListener(HostListener listener)
                        throws RemoteException
Remove a host change listener from the director.

Parameters:
listener - the host change listener to remove
Throws:
RemoteException - if a remote exception occurs