本文整理匯總了Java中org.apache.thrift.TException.printStackTrace方法的典型用法代碼示例。如果您正苦於以下問題:Java TException.printStackTrace方法的具體用法?Java TException.printStackTrace怎麽用?Java TException.printStackTrace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.thrift.TException
的用法示例。
在下文中一共展示了TException.printStackTrace方法的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: listAlgorithms
import org.apache.thrift.TException; //導入方法依賴的package包/類
public Set<String> listAlgorithms(){
Set<String> ret = null;
try {
ret = newClient().listAlgorithms();
transport.close();
} catch (TException x) {
x.printStackTrace();
}
return ret;
}
示例2: describeAlgorithm
import org.apache.thrift.TException; //導入方法依賴的package包/類
public List<String> describeAlgorithm(String name){
List<String> ret = null;
try {
ret = newClient().describeAlgorithm(name);
transport.close();
} catch (TException x) {
x.printStackTrace();
}
return ret;
}
示例3: performAlgorithm
import org.apache.thrift.TException; //導入方法依賴的package包/類
public Object performAlgorithm(String name, Object... params) {
Object ret = null;
try {
ret = KryoTool.toObject(newClient().performAlgorithm(name, KryoTool.toByteBuffer(params)));
transport.close();
} catch (TException x) {
x.printStackTrace();
}
return ret;
}
示例4: getActorMessage
import org.apache.thrift.TException; //導入方法依賴的package包/類
public ActorMessage getActorMessage(byte[] buffer) {
BaseByteArrayPacket packet = new BaseByteArrayPacket();
packet.fromBinary(buffer);
ActorMessage actorMessage = new ActorMessage();
try {
deserializer.deserialize(actorMessage, packet.toBinary());
} catch (TException e) {
e.printStackTrace();
}
return actorMessage;
}
示例5: getEventMessage
import org.apache.thrift.TException; //導入方法依賴的package包/類
public RemoteEventMessage getEventMessage(byte[] buffer) {
RemoteEventMessage event = new RemoteEventMessage();
try {
deserializer.deserialize(event, buffer);
} catch (TException e) {
e.printStackTrace();
}
return event;
}
示例6: deserializeEventMessage
import org.apache.thrift.TException; //導入方法依賴的package包/類
public byte[] deserializeEventMessage(RemoteEventMessage event) {
try {
return serializer.serialize(event);
} catch (TException e) {
e.printStackTrace();
return null;
}
}
示例7: getActorMessageByteArray
import org.apache.thrift.TException; //導入方法依賴的package包/類
public byte[] getActorMessageByteArray(Operation operation, TBase<?, ?> base) {
byte[] tbaseMessage = null;
ActorMessage actorMessage = new ActorMessage();
actorMessage.op = operation;
try {
actorMessage.messageRaw = getTbaseByteBuffer(base);
tbaseMessage = getOnlySerializerByteArray(actorMessage);
} catch (TException e) {
e.printStackTrace();
}
return tbaseMessage;
}
示例8: send2SessionActor
import org.apache.thrift.TException; //導入方法依賴的package包/類
/**
* 發送消息
*
* @param msg
*/
private void send2SessionActor(Object msg) {
if (msg instanceof BaseByteArrayPacket) {
ActorMessage message = new ActorMessage();
byte[] binary = ((BaseByteArrayPacket) msg).toBinary();
ByteBuffer buffer = ByteBuffer.allocate(binary.length);
buffer.put(binary);
buffer.flip();
message.messageRaw = buffer;
message.op = Operation.SESSION_RECIVE_PACKET;
byte[] actorMessage;
try {
actorMessage = thriftSerializerFactory.getActorMessage(message);
actorRef.tell(actorMessage, ActorRef.noSender());
CObject newInstance = CObject.newInstance();
newInstance.putInt(MonitorEventType.KEY, MonitorEventType.SESSEION_RECIVE_FLOW);
newInstance.putLong(MonitorEventType.SESSION_ID, sessionId);
newInstance.putDouble(MonitorEventType.SESSION_FLOW, binary.length);
newInstance.putLong(MonitorEventType.SESSION_TIME, System.currentTimeMillis());
AkkaUtil.getInbox().send(CodeBrokerSystem.getInstance().getMonitorManager(), newInstance);
} catch (TException e) {
e.printStackTrace();
}
}
}