jSyncManager Simple Java Server

org.jSyncManager.SJS.Adapters.SMTPServer
Class RemoteServerMessage

java.lang.Object
  extended by org.jSyncManager.SJS.Adapters.SMTPServer.RemoteServerMessage

public class RemoteServerMessage
extends java.lang.Object

This class is used to store a message that must be relayed to a specific remote server. It contains the server, the original message object, a list of domains that relay to this server, and a list of recipients that will be sent the message (a subset of the recipients within the original message object).

Author:
Cecelia Redding

Constructor Summary
RemoteServerMessage(LogManager logManager, java.lang.String server, Message message)
          Constructor to create a new RemoteServerMessage
 
Method Summary
 void addDomain(Domain domain)
           
 void addRcpt(Address rcpt)
           
 java.util.List<Domain> getDomains()
           
 int getPort()
           
 java.util.List<Address> getRcpts()
           
 java.lang.String getServer()
           
 boolean send()
          Finally relays the one message to the server for all recipients
 void setPort(int port)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteServerMessage

public RemoteServerMessage(LogManager logManager,
                           java.lang.String server,
                           Message message)
Constructor to create a new RemoteServerMessage

Parameters:
server - The name of the server
message - The message to be relayed
Method Detail

send

public boolean send()
Finally relays the one message to the server for all recipients

Returns:
If it was successful

addRcpt

public void addRcpt(Address rcpt)
Parameters:
rcpt - A rcpt that gets sent the message by this server

addDomain

public void addDomain(Domain domain)
Parameters:
domain - A domain that gets relayed to this server

getRcpts

public java.util.List<Address> getRcpts()
Returns:
The list of recipients that get sent the message by this server

getDomains

public java.util.List<Domain> getDomains()
Returns:
The list of domains that get relayed to this server

getServer

public java.lang.String getServer()
Returns:
The name of the remote server

getPort

public int getPort()
Returns:
The port used by the remote server

setPort

public void setPort(int port)
Parameters:
port - The port used by the remote server

jSyncManager Simple Java Server

Copyright (c) 2004 Brad BARCLAY. All Rights Reserved.