Package yapion.packet
Class YAPIONPacket
- java.lang.Object
-
- yapion.packet.YAPIONPacket
-
public abstract class YAPIONPacket extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description YAPIONPacket()
-
Method Summary
Modifier and Type Method Description java.lang.ExceptiongetException()The exception that was thrown by theYAPIONPacketHandler.handlePacket(YAPIONPacket)method.java.lang.StringgetType()The type name returned byClass.getTypeName().YAPIONOutputStreamgetYAPIONOutputStream()voidsetYAPIONOutputStream(YAPIONOutputStream yapionOutputStream)Set theYAPIONOutputStreamthat corresponds to theInputStream.YAPIONObjecttoYAPION()Serialize thisYAPIONPacketto aYAPIONObject.
-
-
-
Method Detail
-
toYAPION
public final YAPIONObject toYAPION()
Serialize thisYAPIONPacketto aYAPIONObject.- Returns:
- a
YAPIONObject
-
getType
public final java.lang.String getType()
The type name returned byClass.getTypeName().- Returns:
- result of
Class.getTypeName()
-
getException
public final java.lang.Exception getException()
The exception that was thrown by theYAPIONPacketHandler.handlePacket(YAPIONPacket)method. You could for example log thisExceptionin theYAPIONPacketHandlerset withYAPIONPacketReceiver.setErrorHandler(YAPIONPacketHandler).- Returns:
- the
Exceptionthat was thrown
-
getYAPIONOutputStream
public final YAPIONOutputStream getYAPIONOutputStream()
- Returns:
- the
YAPIONOutputStreamset byYAPIONSocket
-
setYAPIONOutputStream
public final void setYAPIONOutputStream(YAPIONOutputStream yapionOutputStream)
Set theYAPIONOutputStreamthat corresponds to theInputStream. This normally gets called byYAPIONInputStreamand will be set to theYAPIONInputStreamby theYAPIONSocketcorresponding to this.- Parameters:
yapionOutputStream- theYAPIONOutputStreamto set
-
-