first commit
This commit is contained in:
50
CS2335/lab4/src/netpaint/messaging/GenericServerMessage.java
Normal file
50
CS2335/lab4/src/netpaint/messaging/GenericServerMessage.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package netpaint.messaging;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Class GenericServerMessage: This is a generic server message.
|
||||
*
|
||||
* <PRE>
|
||||
* Revision History:
|
||||
* v1.0 (Jan. 27, 2004) - Created the GenericServerMessage class
|
||||
* </PRE>
|
||||
*
|
||||
* @author <A HREF="mailto:gtg563g@prism.gatech.edu">Daniyar Zhanbekov</A>
|
||||
* @version Version 1.0, Jan. 29, 2004
|
||||
*/
|
||||
public class GenericServerMessage extends AbstractServerMessage {
|
||||
|
||||
/**
|
||||
* Creates a new <code>GenericServerMessage</code> instance.
|
||||
*
|
||||
* @param message a <code>String</code> value
|
||||
*/
|
||||
public GenericServerMessage(final String message) {
|
||||
super(MessageSettings.SERVER_MESSAGE_TYPE, message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Builds a message from the data provided.
|
||||
*
|
||||
* @param data a <code>List</code> value
|
||||
* @return an <code>AbstractMessage</code> value
|
||||
*/
|
||||
protected static AbstractMessage buildMessage(final List data) {
|
||||
if (data == null || (data.size() != 1)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new GenericServerMessage((String) (data.get(0)));
|
||||
}
|
||||
/**
|
||||
* makes a message from the data provided.
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
protected void makeMessage() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user