Class ClientMessage
- java.lang.Object
-
- com.perforce.p4java.impl.mapbased.rpc.func.client.ClientMessage
-
public class ClientMessage extends java.lang.ObjectPerforce P4Java client error / info / warning messages.These are messages that the P4Java API itself generates rather than receives from the Perforce server. Most of these are copied fairly closely from the corresponding C++ API class(es) and not all are currently used. The messages defined here all use the common %arg% string interpolation scheme that's used for messages coming in from the server in (e.g.) client-Message packets.
The errors here are not typically passed as-is back to the end user, but are translated in the map-based server implementation superclass ServerImpl to more generic P4Java exceptions or filespec statuses.
No attempt has (yet) been made to internationalise the corresponding error strings, but that may happen in future releases of the API.
FIXME: what to do about P4Java-specific codes? -- HR.(Current strategy is to simply use zero, as we don't actually extract error codes anywhere yet).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classClientMessage.ClientMessageIdBasic message ID.static classClientMessage.ClientMessageTypeWhere the message originated, or which part of the command chain it refers to.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClientMessagegetClientMessage(ClientMessage.ClientMessageId id)Return the ClientMessage associated with this ID, if any.intgetCode()ClientMessage.ClientMessageIdgetId()java.lang.String[]getMsgParamNames()java.lang.String[]getMsgs()voidsetCode(int code)voidsetId(ClientMessage.ClientMessageId id)voidsetMsgParamNames(java.lang.String[] msgParamNames)voidsetMsgs(java.lang.String[] msgs)
-
-
-
Method Detail
-
getClientMessage
public static ClientMessage getClientMessage(ClientMessage.ClientMessageId id)
Return the ClientMessage associated with this ID, if any. Never returns null, but will return the UNKNOWN message if it can't find a match.- Parameters:
id- ClientMessageId- Returns:
- ClientMessage
-
getId
public ClientMessage.ClientMessageId getId()
-
setId
public void setId(ClientMessage.ClientMessageId id)
-
getMsgs
public java.lang.String[] getMsgs()
-
setMsgs
public void setMsgs(java.lang.String[] msgs)
-
getMsgParamNames
public java.lang.String[] getMsgParamNames()
-
setMsgParamNames
public void setMsgParamNames(java.lang.String[] msgParamNames)
-
getCode
public int getCode()
-
setCode
public void setCode(int code)
-
-