/*
* The MIT License
*
- * Copyright 2015 TJ <hacker@iam.tj>.
+ * Copyright 2015 Eddie Berrisford-Lynch <dev@fun2be.me>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* Wraps an object and intent label together for passing over a network.
*
* @see NetworkMessageEvent
- * @author TJ <hacker@iam.tj>
+ * @author Eddie Berrisford-Lynch <dev@fun2be.me>
*/
public class NetworkMessage implements Serializable, Cloneable {
/**
*/
long _key;
- Class<?> _class;
+ // Class<?> _class;
MessageAbstract _message;
/**
_intent = null;
_serviceSender = null;
_serviceTarget = null;
- _class = null;
+ // _class = null;
_message = null;
}
+ /**
+ * Make the NetworkMessage printable.
+ *
+ * @return human readable text
+ */
+ @Override
+ public String toString() {
+ return new String("_serializedLength:" + _serializeLength +
+ ",_intent:" + _intent +
+ ",_serviceSender:" + _serviceSender +
+ ",_serviceTarget:" + _serviceTarget +
+ ",_message:" + _message.toString()
+ );
+ }
/**
* Create a message for passing over the network.
*
_serviceSender = null;
_serviceTarget = target;
_message = message;
- _class = _message.getClass();
+ // _class = _message.getClass();
}
/**