Class ServerCommon
- java.lang.Object
-
- org.jboss.remotingjmx.protocol.v2.ServerCommon
-
- Direct Known Subclasses:
ParameterProxy
public abstract class ServerCommon extends Object
An extension of Common to hold anything common to both ParameterProxy and ServerProxy but not ClientConnection.- Author:
- Darran Lofthouse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
ServerCommon.MessageReciever
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Marshaller
prepareForMarshalling(DataOutput dataOutput)
Creates and returns aMarshaller
which is ready to be used for marshalling.protected Unmarshaller
prepareForUnMarshalling(DataInput dataInput)
Creates and returns aUnmarshaller
which is ready to be used for unmarshalling.protected Unmarshaller
prepareForUnMarshalling(DataInput dataInput, ClassResolver classResolver)
Creates and returns aUnmarshaller
which is ready to be used for unmarshalling.protected void
sendWelcomeMessage()
protected void
write(org.jboss.remotingjmx.protocol.v2.Common.MessageWriter writer)
protected void
writeResponse(byte inResponseTo, int correlationId)
protected void
writeResponse(Exception e, byte inResponseTo, int correlationId)
protected void
writeResponse(String response, byte inResponseTo, int correlationId)
-
-
-
Method Detail
-
sendWelcomeMessage
protected void sendWelcomeMessage() throws IOException
- Throws:
IOException
-
writeResponse
protected void writeResponse(Exception e, byte inResponseTo, int correlationId) throws IOException
- Throws:
IOException
-
writeResponse
protected void writeResponse(byte inResponseTo, int correlationId) throws IOException
- Throws:
IOException
-
writeResponse
protected void writeResponse(String response, byte inResponseTo, int correlationId) throws IOException
- Throws:
IOException
-
prepareForMarshalling
protected Marshaller prepareForMarshalling(DataOutput dataOutput) throws IOException
Creates and returns aMarshaller
which is ready to be used for marshalling. TheMarshaller.start(org.jboss.marshalling.ByteOutput)
will be invoked by this method, to use the passeddataOutput
, before returning the marshaller.- Parameters:
dataOutput
- TheDataOutput
to which the data will be marshalled- Returns:
- Throws:
IOException
-
prepareForUnMarshalling
protected Unmarshaller prepareForUnMarshalling(DataInput dataInput) throws IOException
Creates and returns aUnmarshaller
which is ready to be used for unmarshalling. TheUnmarshaller.start(org.jboss.marshalling.ByteInput)
will be invoked by this method, to use the passeddataInput
, before returning the unmarshaller. This unmarshaller will use the context class loader to resolve any classes.- Parameters:
dataInput
- The data input from which to unmarshall- Returns:
- Throws:
IOException
-
prepareForUnMarshalling
protected Unmarshaller prepareForUnMarshalling(DataInput dataInput, ClassResolver classResolver) throws IOException
Creates and returns aUnmarshaller
which is ready to be used for unmarshalling. TheUnmarshaller.start(org.jboss.marshalling.ByteInput)
will be invoked by this method, to use the passeddataInput
, before returning the unmarshaller.- Parameters:
dataInput
- The data input from which to unmarshallclassResolver
- The class resolver to use for unmarshalling- Returns:
- Throws:
IOException
-
write
protected void write(org.jboss.remotingjmx.protocol.v2.Common.MessageWriter writer) throws IOException
- Throws:
IOException
-
-